#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{
        int b[1000007];
        memset(b,0,sizeof(b));
        rep(i,n){
            ll tmp = a[i];
            int j=2;
            while(tmp>1){
                if(tmp%j==0){
                    ++b[j];
                    if(b[j]>1){
                        cout<<"setwise coprime"<<endl;
                        return 0;
                    }
                    while(tmp%j==0){
                        tmp/=j;
                    }
                }
                ++j;
            }
        }
    }
    cout<<"pairwise coprime"<<endl;
	return 0;
}