#include <bits/stdc++.h>
#define NMAX 300005

using namespace std;
using ll = long long;
using pll = pair<ll,ll>;
const ll MOD=1e9+7;
ll primes[250],sz=0;
bool sieve[1100],counted[1000000];
void getprimes(){
    ll size=1100;
    for(ll i=4;i*i<size;i++)
        sieve[i]=1;
    for(ll i=3;i*i<size;i+=2){
        if(!sieve[i])
            for(ll j=i*i;j<size;j+=i)
                sieve[j]=1;
    }
    for(ll i=2;i<size;i++){
        if(!sieve[i])
            primes[sz++]=i;
    }
}
bool wrongDivs(ll x){
    for(ll i=0;primes[i]*primes[i]<=x;i++){
        if(x%primes[i]==0){
            if(counted[primes[i]])
                return true;
            counted[primes[i]]=1;
        }
        while(x%primes[i]==0)
            x/=primes[i];
    }
    if(x>1){
        if(counted[x])
            return true;
        counted[x]=1;
    }
    return false;
}
int main()
{
    getprimes();
    ll n,x,arrgcd;
    bool pairwise_coprime=1,setwise_coprime=0;
    cin>>n;
    for(ll i=0;i<n;i++){
        cin>>x;
        if(!setwise_coprime){
            if(i==0) arrgcd=x;
            else arrgcd=__gcd(arrgcd,x);
            if(arrgcd==1) setwise_coprime=1;
        }
        if(pairwise_coprime){
            if(wrongDivs(x))
                pairwise_coprime=0;
        }
    }
    if(pairwise_coprime)
        cout<<"pairwise coprime";
    else if(setwise_coprime)
        cout<<"setwise coprime";
    else cout<<"not coprime";
    return 0;
}
