//Ace
#include <bits/stdc++.h>
using namespace std;
using in = long long;
using str = string;
using pi = pair<in, in>;
using vi = vector<in>;
#define F first
#define S second
#define pb push_back
#define rep(i, k, n) for (in i = k; i < n; ++i)
#define repr(i, k, n) for (in i = k; i >= n; --i)
#define sz(x) (in) x.size()
#define all(x) begin(x), end(x)
const in MOD = 1e9 + 7;
const in N = 1e6 + 1;

in fact[N];

void seive()
{
    rep(i, 2, N)
    {
        if (fact[i] == 0)
        {
            for (in j = i * i; j < N; j += i)
                fact[j] = i;
        }
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    in n;
    cin >> n;
    in a[n];
    in gc = 0;
    rep(i, 0, n)
    {
        cin >> a[i];
        gc = __gcd(a[i], gc);
    }

    if (gc != 1)
    {
        cout << "not coprime";
    }
    else
    {
        seive();
        map<in, in> vis;
        rep(i, 0, n)
        {
            map<in, in> tvis;
            while (fact[a[i]] != 0)
            {
                if (vis[fact[a[i]]] == 1)
                {
                    cout << "setwise coprime";
                    return 0;
                }
                tvis[fact[a[i]]] += 1;
                a[i] /= fact[a[i]];
            }
            if (vis[a[i]] == 1)
            {
                cout << "setwise coprime";
                return 0;
            }
            tvis[a[i]] = 1;
            for (auto j : tvis)
                vis[j.first] += j.second;
        }
        cout << "pairwise coprime";
    }

    return 0;
}