#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define pb push_back
#define f(i,x,y) for(i=x;i<y;i++)
#define vll vector<ll>
#define fast    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define mod 1000000007

int main()
{
    fast;
    ll n,i,a;
    cin>>n;
    
    vll v;
    
    f(i,0,n)
    {
        cin>>a;
        v.pb(a);
    }
    ll gcd=v[0];
    
    f(i,1,n)
    {
        gcd=__gcd(gcd,v[i]);
    }
    if(gcd!=1)
        cout<<"not coprime"<<endl;
    else
    {
        map<ll,ll> m;
        ll f=0;
        for(i=n-1;i>=0;i--)
        {
            ll num=v[i];
            ll j=2;
            map<ll,ll> m1;
            while(num!=1)
            {
                if(num%j==0)
                {
                    num=num/j;
                    m1[j]++;
                }
                else
                    j++;
            }
            for(auto k:m1)
            {
                if(m[k.first]>0)
                {
                    f=1;
                    break;
                }
                else
                    m[k.first]=1;
            }
            if(f==1)
            {
                break;
            }
        }
        if(f==1)
            cout<<"setwise coprime"<<endl;
        else
            cout<<"pairwise coprime"<<endl;
    }
    return 0;
}