#include<bits/stdc++.h>
using namespace std;
 
#define ll          long long int
#define ld          long double
#define pb          push_back
#define mp          make_pair
#define ff          first
#define se          second
#define endl        '\n'
#define fd(n)       fixed<<setprecision(n)
#define MAX         100000000000000000
#define MAXN        1000050
#define mod         1000000007  
#define pi          3.1415926535897932384626433
 
ll fun(ll x,ll y){
    ll ans=1;
    while(y>0){
        if(y%2==1){
            ans=ans*1ll*x;
            ans=ans%mod;
        }
        y=y/2;
        x=(x*1ll*x)%mod;
    }
    return ans;
}
 
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n,i,flag=0,j,x;
    ll prime[MAXN],prime1[MAXN];
    memset(prime,0,sizeof(prime));
    memset(prime1,0,sizeof(prime1));
    for(i=2;i<MAXN;i++){
        if(prime[i]==0){
            for(j=i+i;j<MAXN;j+=i){
                prime[j]=1;
            }
        }
    }
    cin>>n;
    ll a[n];
    for(i=0;i<n;i++){
        cin>>a[i];
        prime1[a[i]]++;
    }
    x=a[0];
    for(i=1;i<n;i++){
        x=__gcd(x,a[i]);
    }
    if(x>=2){
        cout<<"not coprime";
    }
    else{
        for(i=1;i<MAXN;i++){
            if(prime1[i]>=2){
                flag=1;
            }
            if(prime1[i]>=1){
                for(j=i+i;j<MAXN;j+=i){
                    if(prime1[j]>=1){
                        flag=1;
                    }
                }    
            }
        }
        if(flag==0){
            cout<<"pairwise coprime";
        }
        else{
            cout<<"setwise coprime";
        }
    }
}