#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i<n;i++)
#define rep2(i,a,n) for(int i=a;i<n;i++)
#define been(ix) (ix).begin(),(ix).end()
using namespace std;
typedef long long ll; 
typedef vector<int> vi;
typedef vector<long long> vl;
const ll INFL = 1e18;
const int INF = 1001001001; 
typedef pair<int,int> P;
#define foreach(ix,i) for(auto& (ix) : (i))
typedef long double ld;
int mod =1000000007;
const double PI = acos(-1);

int main(){
   int n;cin>>n;
   int a[n];
   rep(i,n)cin>>a[i];
   vector<bool>v(1000005,false);
   bool f=true;
   rep(i,n){
       rep(j,sqrt(a[i])+1){
           if(j==1||j==0)continue;
           if(a[i]%j==0){
               if(v[j])f=false;
               if(v[a[i]/j])f=false;
               v[j]=true;
               v[a[i]/j]=true;
           }
       }
       if(v[a[i]])f=false;
       v[a[i]]=true;
   }
   if(f){
       cout<<"pairwise coprime"<<endl;
       return 0;
   }
   int g =a[0];
   rep(i,n){
       g=__gcd(g,a[i]);
   }
   if(g==1)cout<<"setwise coprime"<<endl;
   else
   {
       cout<<"not coprime"<<endl;
   }
   
}
