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

#define ll long long
#define mod 1000000007
#define debug1(x) cerr<<#x<<" : "<<x<<"\n";
#define debug2(x,y) cerr<<#x<<" : "<<x<<"\t"<<#y<<" : "<<y<<"\n";
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

int main() {
    IOS;
    ll n;
    cin>>n;
    ll a[n];
    ll x=0;
    for(ll i=0;i<n;i++){
        cin>>a[i];
        x=__gcd(x,a[i]);
    }
    if(x!=1)cout<<"not coprime";
    else{

        map<ll,ll>mp;
        ll flag=0;
        for(ll i=0;i<n;i++){
            if(mp[a[i]]==1){
                flag =1;
                break;
            }
            mp[a[i]]=1;
            for (ll j=2; j<=sqrt(a[i]); j++)
            {
                if (a[i]%j == 0)
                {
                    if (a[i]/j == j){
                        if(mp[j]==1){
                            flag =1;
                            break;
                        }
                        mp[j]=1;
                    }
                    else{
                        if(mp[j]==1 || mp[a[i]/j]==1){
                            flag =1;
                            break;
                        }
                        mp[j]=1;
                        mp[a[i]/j]=1;
                    }
                }
            }
            if(flag){
                break;
            }

        }
        if(!flag)cout<<"pairwise coprime";
        else cout<<"setwise coprime";
    }

    return 0 ;
}
