#include <bits/stdc++.h>
#define rep(i,n) for (long long i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vec = vector<ll>;
using vecp = vector<P>;
using mat = vector<vec>;
using matp = vector<vecp>;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define all(v) v.begin(), v.end()

vec Prime(1e7,0),W(1e7,0),isPrime(1e7+1,0);
void sosu(ll n){
  isPrime.at(0)=1;
  isPrime.at(1)=1;
  ll t=0;
  rep(i,n+1){
    if(isPrime.at(i)==0){
      Prime.at(t)=i;
      t++;
      for(ll j=2*i;j<=n;j+=i){
        isPrime.at(j)=1;
      }
    }
  }
}
bool factor(ll M){
  rep(i,100000){
    if(Prime.at(i)==0){
      return true;
      
    }else{
      if(M%Prime.at(i)==0&&W.at(i)!=0){
        return false;
      }else if(M%Prime.at(i)==0){
        W.at(i)=1;
      }
    }
  }
}

int main(){
  ll N,s,k=0;
  cin >> N;
  vec A(N);
  sosu(1e6);
  rep(i,N){
    cin >> A.at(i);
    if(!factor(A.at(i))){
      k=1;
    }
    if(i==0){
      s=A.at(i);
    }else{
      s=gcd(s,A.at(i));
    }
  }
  if(k==0){
    cout << "pairwise coprime" << endl;
  }else if(s==1){
    cout << "setwise coprime" << endl;
  }else{
    cout << "not coprime" << endl;
  }
}