/* ****Ragnar7 _Lawliet_**** */
/* First, solve the problem.Then write the code. */
#include<bits/stdc++.h>
#define ll          long long
#define ld             long double
#define hell        1000000007
#define time        cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    #ifndef ONLINE_JUDGE
    freopen ("input.txt","r",stdin);
    // freopen ("output.txt","w",stdout);
    #endif
    ll t = 1;
    // cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;
        ll N = 1e6+5;
        ll sieve[N],chk[N];
        for(ll i=0;i<N;i++)
            sieve[i] = 0;
        ll x;
        vector<ll> v;
        memset(chk,0,sizeof(chk));
        ll ans = 1;
        ll g = 0;
        for(ll i=0;i<n;i++)
        {
            cin>>x;
            v.push_back(x);
            chk[x]++;
            if(chk[x]>1)
                ans = 0;
            g = __gcd(x,g);
        }
        ll val = 0;
        
        for(ll i=2;i<N;i++)
        {
            if(sieve[i])
                continue;
            val = 0;
            for(ll j=2*i;j<N;j+=i)
            {
                sieve[j] = i;
                val += chk[j];
            }
            if(val>1)
                ans = 0;
        }
        if(ans==0 and g!=1)
        {
            cout<<"not coprime";
            return 0;
        }
        else if(ans==0 and g==1)
        {
            cout<<"setwise prime";
            return 0;
        }
        cout<<"pairwise coprime";       
    }

    
    time
    return 0;
}