#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, start, n) for (ll i = (ll)(start); i < (ll)(n); ++i)
static const ll INFTY = 1L << 62L;
void solver(ll *a, ll n)
{
    ll v[1000010] = {};
    bool ispair = true;
    rep(i, 0, n)
    {
        rep(j, 1, sqrt(a[i]) + 1)
        {
            if (a[i] % j == 0)
            {
                ++v[j];
                if (j * j != a[i])
                    ++v[a[i] / j];
            }
        }
    }
    rep(i, 2, 100010)
    {
        if (v[i] > 1)
        {
            ispair = false;
            break;
        }
    }
    if (ispair)
    {
        cout << "pairwise coprime\n";
        return;
    }
    ll ans = a[0];
    rep(i, 1, n)
    {
        ans = gcd(ans, a[i]);
    }
    if (ans == 1)
    {
        cout << "setwise coprime\n";
        return;
    }
    cout << "not coprime\n";
    return;
}
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin >> n;
    ll a[n];
    rep(i, 0, n) cin >> a[i];
    solver(a, n);
}