#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[1000000+30];
int main()
{
    ll n,i,j,k;
    cin>>n;
    ll p=0;
    ll ar[n];
    ll pp=0,v,q=0;
    for(i=0;i<n;i++){
        scanf("%lld",&p);
        if(i==0)
            v=p;
        v=__gcd(p,v);
        ar[i]=p;
        a[p]++;
        if(q==1)
            continue;
        for(j=2;j*j<=p;j++){
            if(p%j==0){
                if((p/j)==j){
                    a[j]++;
                    if(a[j]>1)
                        q=1;
                }
                else{
                    a[j]++;
                    a[(p/j)]++;
                    if(a[j]>1 || a[(p/j)]>1)
                        q=1;
                }
            }
            if(q==1)
                break;
        }
    }
    //for(i=0;i<10;i++)
        //cout<<a[i]<<" ";cout<<endl;
    if(q!=1){
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
    p=ar[0];
    for(i=1;i<n;i++){
        ll www=ar[i];
      //  cout<<p<<endl;
        p=__gcd(p,www);
    }
    //cout<<p<<endl;
    if(p==1){
        cout<<"setwise coprime"<<endl;
        return 0;
    }
    cout<<"not coprime"<<endl;
}
