#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
const ll MAX = 1001001;
const ll MOD = 1000000007;
int main()
{
    ll n;
    cin >> n;
    vector<ll> a(n);
    rep(i, n)
    {
        cin >> a[i];
    }
    ll ch = a[0];
    rep2(i, 1, n)
    {
        ch = __gcd(ch, a[i]);
    }
    if (ch != 1)
    {
        cout << "not coprime" << endl;
        return 0;
    }
    set<ll> s;
    rep(i, n)
    {
        ll m = a[i];
        for (ll j = 2; j * j <= m; j++)
        {
            if (a[i] % j == 0)
            {
                if (s.count(j))
                {
                    cout << "setwise coprime" << endl;
                    return 0;
                }
                s.insert(j);
                a[i] /= j;
            }
            while (a[i] % j == 0)
            {
                a[i] /= j;
            }
        }
    }
    cout << "pairwise coprime" << endl;
}