#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vin=vector<int>;
using vll=vector<long long>;
using vvin=vector<vector<int>>;
using vvll=vector<vector<long long>>;
using vstr=vector<string>;
using vvstr=vector<vector<string>>;
using vch=vector<char>;
using vvch=vector<vector<char>>;
using vbo=vector<bool>;
using vvbo=vector<vector<bool>>;
using vpii=vector<pair<int,int>>;
using pqsin=priority_queue<int,vector<int>,greater<int>>;
#define mp make_pair
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep2(i,s,n) for(int i=(s);i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define decp(n) cout<<fixed<<setprecision((int)n)
const ll inf=1e9+7;
const ll INF=1e18;

vll pr;
set<ll> pri;

ll eratosthenes(ll x){
    vbo isprime(x+1,true);
    isprime[0]=false;
    isprime[1]=false;
    ll p=0;
    for(ll i=2;i<=x;i++){
        if(isprime[i]){
            p++;
            pr.push_back(i);
            pri.insert(i);
            for(ll j=2*i;j<=x;j+=i)isprime[j]=false;
        }
    }
    return p;
}

vbo prime(1e6+10,false);

bool factorization(ll x){
    for(int i=0;pr[i]*pr[i]<x;i++){
        if(x%pr[i]==0){
            if(prime[pr[i]])return false;
            prime[pr[i]]=true;
            x%=pr[i];
        }
    }
    if(x!=1&&pri.count(x)){
        if(prime[x])return false;
        prime[x]=true;
    }
    return true;
}

int main(){
    eratosthenes(1e6+10);
    int n;cin>>n;
    ll p=(ll)0;
    vll a(n);
    rep(i,n){
        cin>>a[i];
        p=__gcd(p,a[i]);
    }
    if(p!=1)cout<<"not coprime"<<endl;
    else{
        rep(i,n){
            if(!factorization(a[i])){
                cout<<"setwise coprime"<<endl;
                return 0;
            }
        }
        cout<<"pairwise coprime"<<endl;
    }
    //cout<<pr.size()<<endl;
}