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

int main(){
    vector<int> primes;
    primes.push_back(2);
    for(int i=3;i<=500000;i=i+2){
        int flag=1;
        for(int j=3;j<=sqrt(i);j=j+2){
            if(i%j==0){flag=0;break;}
        }
        if(flag==1)primes.push_back(i);
    }
    int n;
    cin>>n;
    map<int,int> m; int maxx = INT_MIN; int soul=0;int amma=0;
    for(int i=0;i<n;++i){
        int temp;cin>>temp;maxx= max(maxx,temp);
        if(temp%2==0)amma++;
        if(i==0){
            soul = temp;
        }
        else {
            soul = __gcd(soul,temp);
        }
        m[temp]++;
    }
    if(amma>=2){
        if(soul==1)cout<<"setwise coprime"<<endl;
        else cout<<"not coprime"<<endl;
        return 0;
    }
    int flag=0; 
    for(int k=0;k<primes.size();++k){
        int i = primes[k];
        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=j+2;
        }
        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;
}