  #include<bits/stdc++.h>

  #define EB emplace_back
  #define int long long
  #define F first
  #define S second
  #define N 500005
  #define all(x) x.begin(),x.end()
  #define endl '\n'
  #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

  using namespace std;

  bool is_prime(int x){
    for(int i = 2; i * i <= x; i++){
      if(x % i == 0){
        return false;
      }
    }
    return true;
  }

  int32_t main(){
    IOS;
    int tt = 1; 
    //cin >> tt;
    while(tt--){
      int n; cin >> n;
      int A[n];
      unordered_map < int, int > mp;
      vector < int > primes;
      for(int i = 2; i < 1100; i++){
        if(is_prime(i)) primes.EB(i);
      }
     
      int g = 0;
      bool one = true;
      for(int i = 0; i < n; i++) {
        cin >> A[i];
        if(A[i] == 1) continue;
        bool ok = true;
        g = __gcd(A[i], g);
        for(auto x : primes){
          if(A[i] % x == 0){
            ok = false;
            mp[x]++;
            if(A[i] / x != x && x != A[i]){
              mp[A[i] / x]++;
            }
          }
        }
        if(ok) mp[A[i]]++;
        
      }
      bool flag = true;
      
      for(auto x : mp){
        if(x.S > 1){
          flag = 0;
          break;
        }
      }
      
      if(flag) {
        cout << "pairwise coprime" << endl;
        break;
      }
      
      if(g == 1) {
        cout << "setwise coprime" << endl;
        break;
      }
      
      cout << "not coprime";
    
    }
    return 0;
  }
