#include<bits/stdc++.h>
#define INFTY 10000000000
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
const int MOD=1000000007;
const int di[4] = {-1,0,1,0};
const int dj[4] = {0,-1,0,1};
const int INF = 1e9;
const int A = 1000005;
int main(){
    int n;cin>>n;
    vector<int> a(n);
    
    vector<int> dd(A,0);
    rep(i,n){cin>>a[i];dd[a[i]]++;}
    int pp=1,sp=0;
    int sai=a[0];
    bool pairwise = true;
    for (int i = 2;i < A;i++){
        int cnt = 0;
        for(int j = i;j<A;j += i){
            cnt += dd[j];
        }
        if(cnt > 1){
            pairwise = false;
        }
        if(pairwise){
            cout<<"pairwise coprime"<<endl;
            return 0;
        }
    }
    rep(i,n){
        sai = __gcd(sai,a[i]);
        
    }
    if(sai==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;

    return 0;
}