#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const long double pi=acos(-1);
#define x  first
#define y  second
#define read(n,a) for(int i=0;i<n;i++)cin>>a[i];
#define rep(z,n)  for(int i=z;i<n;i++)

ll a[2000002]={};
int b[1000002]={};
ll n,m;

int main()
{
    cin.tie(0);
    cin.sync_with_stdio(0);
    ///freopen("ss.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int t=1;
    //cin>>t;
    while(t--)
    {
       cin>>n;
       read(n,a);
       ll g=__gcd(a[0],a[1]);
       rep(0,n)
       {
           g=__gcd(g,a[i]);
       }
       if(g!=1)return cout<<"not coprime",0;
       rep(0,n)
       {
            ll ii=1;
            while(ii * ii < a[i])
            {
                if(a[i]%ii ==0)
                {
                    if(ii==1 && !b[a[i]])
                    {
                        ii++;
                        continue;
                    }
                    else if(ii==1)
                    {
                        cout<<"setwise coprime";
                        return 0;
                    }
                    else if(b[ii] || b[a[i]/ii])
                    {
                        cout<<"setwise coprime";
                        return 0;
                    }
                }
                b[ii]++;
                b[a[i]/ii]++;
                ii++;
            }
            if(ii * ii == a[i])
            {
                if(b[ii] || b[a[i]/ii])
                    {
                        if(ii==1 )continue;
                        cout<<"setwise coprime";
                        return 0;
                    }
            }
       }
       cout<<"pairwise coprime";
    }
    return 0;
}
