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

#define REP(i,p,n) for(ll i=p;i<ll(n);++i)
#define rep(i,n) REP(i,0,n)

using ll = long long;
using pll = pair<ll, ll>;

template<typename T> T gcdraw(T a, T b)
{
    return a ? gcdraw(b%a, a) : b;
}

template<typename T> T gcd(T a, T b)
{
    const auto aa = abs(a), bb = abs(b);
    return aa > bb ? gcdraw(aa, bb) : gcdraw(bb, aa);
}

const ll MAXN = 1000000;
ll P[MAXN + 1];
bool B[MAXN + 1];

void makePrimeTable()
{
    for (ll i=2;i*i<=MAXN;++i)
    {
        if (P[i]) { continue; }
        for (ll j=i;j<=MAXN;j+=i) if(!P[j]) { P[j] = i; }
    }
}

int main()
{
    ll N;
    cin >> N;

    vector<ll> A(N);
    rep (i, N) { cin >> A[i]; }

    makePrimeTable();

    bool isPairwise = true;
    ll setwiseValue = A[0];

    for (ll i=0;i<N;++i)
    {
        if (isPairwise) for (ll x=A[i];x!=1;x/=P[x])
        {
            isPairwise &= !B[P[x]];
            B[P[x]] = true;
        }

        setwiseValue = gcd(setwiseValue, A[i]);
    }

    if (isPairwise)             { cout << "pairwise coprime" << endl; }
    else if (setwiseValue == 1) { cout << "setwise coprime" << endl; }
    else                        { cout << "not coprime" << endl; }

    return 0;
}
