/*
Created by Rishu Sahu @ covid 20-20
*/
/*
*****************************************************************
*/

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

#define IOS cin.sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define pai pair<int,int>
#define pal pair<ll,ll>
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,a,b) for(int i=a;i<=b;i++)
#define ff first 
#define ss second
#define sz(x) (int)x.size()
#define vi vector<int>
#define vl vector<ll>
#define mpl map<ll,ll>
#define mpi map<int,int>
#define pb push_back
#define all(x) x.begin(),x.end()

const int mod = 1e9+7;
const int INF = INT_MAX;
const int mxm = 1e6+6;
mpl mp;

ll prime[mxm];
vi vec;

void seive(){
    rep(i,mxm) prime[i]=1;
    prime[1]=prime[0]=0;
    for(int i=2;i*i<mxm;i++){
        if(prime[i]){
            for(int j=i*i;j<mxm;j+=i) 
            prime[j]=0;
        }
    }
    for(int i=2;i<mxm;i++) {
        if(prime[i])
        vec.pb(i);
    }
}

void factor(ll x){
   for(int i=0;vec[i]*vec[i]<=x;i++){
       if(x%vec[i]==0){
           mp[vec[i]]++;
           if(vec[i]*vec[i]!=x)
           mp[x/vec[i]]++;
       }
   }
}

void solve(){
    int n;
    cin>>n;
    int arr[n];
    int gcd=0;
    rep(i,n){
        cin>>arr[i];
        factor(arr[i]);
        gcd=__gcd(gcd,arr[i]);
    }
    int flag=1;
    for(auto it=mp.begin();it!=mp.end();it++){
        if(it->second >=2)
        flag=0;
    }
    if(flag==1&&gcd==1){
        cout<<"pairwise coprime";
    }else if(flag==0&&gcd==1){
        cout<<"setwise coprime";
    }else cout<<"not coprime";
    cout<<endl;
}


int main(){
    int t=1;
    seive();
    //cin>>t;
    while(t--){
        //mp.clear();
        solve();
    }
}