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

typedef long long ll;
typedef pair<int,int> P;

const int INF=1e9;
const int MOD=1e9+7;

vector<ll> prime_table(ll n){ //素数全列挙
    vector<ll> prime(n+1);
    for(int i=0;i<=n;i++){
        prime[i]=i;
    }  
    for(int i=2;i*i<=n;i++){
        if(prime[i]!=i) continue;
        for(int j=2*i;j<=n;j+=i){
            if(prime[j]/i==1) continue;
            prime[j]/=i;
        }
    }
    return prime; //i番目の要素が素数の場合trueを返す
}

int main(){
    int N; cin >> N;
    ll a[N];
    for(int i=0;i<N;i++){
        cin >> a[i];
    }
    sort(a,a+N);
    vector<ll> prime=prime_table(a[N-1]);
    ll used[a[N-1]+1]={};
    bool flag=true;
    for(int i=0;i<N;i++){
        set<ll> s;
        ll tmp=a[i];
        while(tmp>1){
            s.insert(prime[tmp]);
            tmp/=prime[tmp];
        }
        for(auto res:s){
            if(used[res]){
                //cout << res << endl;
                flag=false;
            }
            used[res]=true;
        }
    }
    ll ans=a[0];
    for(int i=1;i<N;i++){
        ans=__gcd(ans,a[i]);
    }
    if(flag){
        cout << "pariwise coprime" << endl;
    }else if(ans==1){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }
}