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

int main(){
    int n;
    cin>>n;
    map<int,int> m; int maxx = INT_MIN; int soul;
    for(int i=0;i<n;++i){
        
        int temp;cin>>temp;maxx= max(maxx,temp);
        if(i==0){
            soul = temp;
        }
        else {
            soul = __gcd(soul,temp);
        }
        m[temp]++;
    }
    int flag=0; 
    for(int i=2;i<=500000;++i){
        int j = 1;int bokka = 0;
        while(i*j<=maxx){
            if(m[i*j]>=2){
                flag = 1;break;
            }
            if(m[i*j]==1)bokka++;
            if(bokka==2){flag=1;break;}
            j++;
        }
        if(flag==1)break;
    }
    if(flag==0){
        cout<<"pairwise coprime"<<endl;
    }
    else if(soul==1){
        cout<<"setwise coprime"<<endl;
    }
    else cout<<"not coprime"<<endl;








    return 0;
}