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

void solve(long long N, std::vector<long long> A)
{

    set<int> s;
    sort(A.begin(), A.end());
    for (auto &&e : A)
    {
        s.insert(e);
    }
    if (A.size() != s.size())
    {
        cout << "not coprime" << endl;
        return;
    }

    // setwize coprimeの確認
    ll res = A[0];
    for (ll i = 1; i < N; i++)
    {
        res = gcd(res, A[i]);
    }
    if (res != 1)
    {
        cout << "not coprime" << endl;
        return;
    }

    // pairwize coprimeの確認
    for (ll i = 2; i <= A[N - 1] / 2; i++)
    {
        if (i == 2 or i % 2 == 1)
        {
            set<int> cnt;
            for (ll j = 1; j <= A[N - 1] / 2; j++)
            {
                if (s.count(i * j) > 0)
                {
                    cnt.insert(i * j);
                }
            }
            if (cnt.size() > 1)
            {
                cout << "setwise coprime" << endl;
                return;
            }
        }
    }
    cout << "pairwise coprime" << endl;
}

signed main()
{
    long long N;
    scanf("%lld", &N);
    std::vector<long long> A(N);
    for (int i = 0; i < N; i++)
    {
        scanf("%lld", &A[i]);
    }
    solve(N, std::move(A));
    return 0;
}
