#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main() {
    int n;cin>>n;
    ll a[n];rep(i,n)cin>>a[i];
    
    ll g = a[0];
    rep(i,n-1)g = __gcd(g,a[i+1]);
    if(g > 1){
        cout<<"not coprime"<<endl;
        return 0;
    }
    else{
        sort(a,a+n,greater<int>());
        int cc=0;
        for(int i=n-1;i>=0;--i){
            if(a[i]==1)++cc;
            else break;
        }

        if(n - cc >=8000000){
            cout<<"setwise coprime"<<endl;
            return 0;
        }
        else{
            rep(i,n){
                for(int j=n- 1 - cc;j>i;--j){
                    if(__gcd(a[i],a[j])!=1){
                        cout<<"setwise coprime"<<endl;
                        return 0;
                    }
//                    if(a[j]*a[j]>=a[i])break;
                }
            }
        }
    }
    cout<<"pairwise coprime"<<endl;
	return 0;
}
