#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define rt return 0
#define endln "\n"
#define all(v) v.begin(), v.end()
#define for1(i, a, b) for (long long int i = a; i < b; i++)
#define for2(i, a, b) for (long long int i = a; i > b; i--)
//  cout << fixed << setprecision(0) << pi <<" "<<npi<<endl;typedef long long int i;
typedef long long int lli;
typedef pair<lli, lli> pll;
lli spf[1000001];
lli MAXN = 1000001;

void sieve()
{
    spf[1] = 1;
    for (lli i = 2; i < MAXN; i++)
    {
        spf[i] = i;
    }
    for (lli i = 4; i < MAXN; i += 2)
    {
        spf[i] = 2;
    }
    for (lli i = 3; i * i < MAXN; i++)
    {

        if (spf[i] == i)
        {
            for (lli j = i * i; j < MAXN; j += i)
            {
                if (spf[j] == j)
                {
                    spf[j] = i;
                }
            }
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    lli n;
    cin >> n;
    lli k = 0;
    vector<lli> v;
    map<lli, lli> m;
    sieve();
    for1(i, 0, n)
    {
        lli x;
        cin >> x;
        k = __gcd(k, x);
        v.pb(x);
    }
    if (k != 1)
    {
        cout << "not coprime" << endl;
        return 0;
    }
    lli f = 0;
    if (n > 78498)
    {
        cout << "setwise coprime" << endl;
        return 0;
    }
    for1(i, 0, n)
    {
        lli a = v[i];
        while (a != 1)
        {
            lli u = spf[a];
            m[u] += 1;
            if (m[u] > 1)
            {
                f = 1;
                break;
            }
            while (a % u == 0)
            {
                a /= u;
            }
        }
        if (f)
        {
            break;
        }
    }
    if (f)
    {
        cout << "setwise coprime" << endl;
        return 0;
    }
    else
    {
        cout << "pairwise coprime" << endl;
    }
}
