#include <bits/stdc++.h>
using namespace std;
using ll = long long;

#define REP(i, n) for(int (i) = 0; (i) < (n); ++(i))
#define REPR(i, n) for(int (i) = (n); (i) >= 0; --(i))
#define FOR(i, n, m) for(int (i) = (n); (i) < (m); ++(i))

// constexpr int INF = 1e9;
constexpr ll INF = 1LL<<61;
constexpr ll mod = 1e9+7;
vector<int> prime;
vector<int> isPrime(1e6+1, 1);
void make_prime(){
  int maxp = 1e6;
  FOR(i, 2, 1e6+1){
    if(!isPrime[i]) continue;
    prime.push_back(i);
    for(int j = 2; j * i <= maxp; j++){
      isPrime[j*i] = 0;
    }
  }
}
int main(){
  make_prime();
  int N;
  cin >> N;
  vector<int> A(N);
  REP(i, N){
    cin >> A[i];
  }
  int all_gcd = A[0];
  REP(i, N){
    all_gcd = gcd(all_gcd, A[i]);
  }
  map<int, int> l;
  bool isPair = true;
  REPR(i, N-1){
    for(int x = 0; prime[x] * prime[x] <= A[i]; x++){
      int p = prime[x];
      if(A[i] % p == 0 && l[A[i]/ p]){
        isPair = false;
      }
      while(A[i] % p == 0){
        l[A[i]/p]++;
        A[i]/=p;
      }
    }
    if(A[i] != 1){
      if(l[A[i]]){
        isPair = false;
      }
      // cout << A[i] << endl;
      assert(isPrime[A[i]]==1);
      l[A[i]]++;
    }
    if(!isPair) break;
  }
  if(isPair){
    assert(all_gcd==1);
    cout << "pairwise coprime" << endl;
  }
  else if(all_gcd ==  1){
    cout << "setwise coprime" << endl;
  }
  else{
    cout << "not coprime" << endl;
  }
  return 0;
}
