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

typedef vector<int> vi;
typedef pair<int,int> pii;
#define For(i,n) for(int i = 0; i < (int) n; ++i)
#define Rep(i,n) for(int i = 1; i <= (int) n; ++i)
#define ll long long
#define lld long double
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define ar array
#define INF 1e18;
#define all(v) (v).begin(),(v).end()
const int N=1e6+1;
int cnt[N];

bool go(int x){
    cnt[x]=1;
    for(int i=2;i*i<=x;i++){
            if(x%i==0){
                if(cnt[i]==1 || cnt[x/i]==1){
                    return false;
                }
                cnt[i]=1;
                cnt[x/i]=1;
            }

    }
    return true;
}

void solve(){
    int n,a[N];
    cin>>n;
    memset(cnt,0,sizeof(cnt));
    For(i,n)cin>>a[i];
    sort(a,a+n);
    int val=a[0];
    for(int i=1;i<n;i++){
        val=__gcd(val,a[i]);

    }
    if(val>1){
            cout<<"not coprime";
            return ;
        }
    For(i,n){
        if(cnt[a[i]]==1 || !go(a[i])){
            cout<<"setwise coprime";
            return ;
        }
    }
    cout<<"pairwise coprime";


}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int t;
    t=1;
    while(t--){
        //cout<<"Case #"<<a<<": ";
        solve();
        //a+=1;
    }
}
