#include <bits/stdc++.h>
#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
using namespace std;
#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 Clear(a) a = decltype(a)()
#define all(a) a.begin(),a.end()
#define vec vector
typedef long long ll;
typedef pair<ll,ll> P;
//const ll big=998244353;
const ll big=1000000007LL;
const ll INF=1e18;
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
ll max(ll x,ll y){
if(x>y)return x;
else return y;
}
ll min(ll x,ll y){
if(x<y)return x;
else return y;
}
ll expm(ll x,ll y){
    if(y==0)return 1;//0^0=1
    if(x==1||x==0)return x;
    if(y%2==1)return (expm(x,y-1)*x)%big;
    ll t=expm(x,y/2);
    return (t*t)%big;
}
ll exp(ll x,ll y){
    if(y==0)return 1;//0^0=1
    if(x==1||y==0)return x;
    if(y%2==1)return exp(x,y-1)*x;
    ll t=exp(x,y/2);
    return t*t;
}
ll inv(ll x){
    return expm(x,big-2);
}


int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    cout << fixed << setprecision(10);
    /*--------------------------------*/

    int n;cin >> n;
    vec<int> a(n);rep(i,n)cin >> a[i];
    //まずsetとして互いに素か否かの判定
    int g=a[0];
    rep2(i,1,n)g=__gcd(a[i],g);
    if(g!=1){
        cout << "not coprime" << endl;
        return 0;
    }

    vec<bool> pri(1001,true);
    pri[0]=false;
    pri[1]=false;
    rep2(i,2,1001){
        if(pri[i]){
            for(int j=2*i;j<=1000;j+=i)pri[j]=false;
        }
    }
    vec<int> primes;
    rep(i,1001){
        if(!pri[i])continue;
        primes.emplace_back(i);
    }
    map<int,int> ans;
    rep(i,n){
        rep(j,primes.size()){
            if(primes[j]*primes[j]>a[i])break;
            if(a[i]%primes[j]==0){
                ans[primes[j]]++;
                if(ans[primes[j]]>=2){
                    cout << "setwise coprime" << endl;return 0;
                }
                while(!a[i]%primes[j])a[i]/=primes[j];
            }
        }
        if(a[i]!=1){
            ans[a[i]]++;
            if(ans[a[i]]>=2){
                cout << "setwise coprime" << endl;return 0;
            }
        }
    }
    cout << "pairwise coprime" << endl;
}