#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,l,r) for(i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define P pair<ll,ll>
#define F first
#define S second
int main(){
  int N,ans,i;cin>>N;int A[N];
  REP(i,N)cin>>A[i];ans=A[0];REP(i,N-1)ans=__gcd(ans,A[i+1]);
  if(ans==1){
    int x=1;vector<int>X;
    REP(i,N){
      int j=1;
      while(A[i]!=1){
        j++;
        if(j*j>A[i]){X.push_back(A[i]);break;}
        if(A[i]%j==0){
          X.push_back(j);
          while(A[i]%j==0)A[i]/=j;
        }
      }
      if(X.size()>78498)break;
    }
    sort(ALL(X));REP(i,X.size()-1)if(X.at(i)==X.at(i+1))x=0;
    if(x==1)cout<<"pairwise coprime"<<endl;else cout<<"setwise coprime"<<endl;
  }
  else cout<<"not coprime"<<endl;
  return 0;
}