#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define us unsigned short
#define IOS ios_base::sync_with_stdio(0);
#define INF LONG_MAX
#define PI 3.1415926535897932384626
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define rep(x,j,n)for(ll x=j;x<n;x++)
#define repr(x,j,n)for(ll x=j;x>n;x--)
#define mod 1000000007
typedef vector<pair<ll,ll>> vpi;
typedef vector<ll> vi;
typedef vector<vi> vvi;

ll modexp(ll a,ll b,ll m)
{
    ll r=1;
    a=a%m;
    while(b>0)
    {
    if(b&1)
    r=(r*a)%m;
    b=b/2;
    a=(a*a)%m;
    }
    return r%m;
}

int main()
{
    ll n;
    cin>>n;
    vi a(n);
    set<ll>pre;
    rep(i,0,n)cin>>a[i],pre.insert(a[i]);
    //cout<<"sdas";
    ll N=1000000;
    vi pr(N,0);
    for(int i=2;i<N;i++)
    {

        if(pr[i])continue;
        for(ll j=i*1ll*i;j<N;j+=i)pr[j]=1;
       // cout<<i<<endl;

    }
    //cout<<"asa";
    bool pco=true;
    for(int i=2;i<N;i++)
    {
        if(pr[i])continue;
        ll cnt=0;
        for(ll j=i*1ll*i;j<=1000000;j+=i)if(pre.find(j)!=pre.end())cnt++;
        if(cnt>1)
        {
            pco=false;
            break;
        }
    }
    if(pco)cout<<"pairwise coprime";
    else
    {
        ll g=a[0];
        rep(i,1,n)
        {
            g=__gcd(g,a[i]);
        }
        if(g==1)cout<<"setwise coprime";
        else cout<<"not coprime";
    }
}
