#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long long int lli;
typedef long long int ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef vector<pll> vop;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<int> vi;
typedef pair<int, int> pii;
#define REP(i,a,b) for( long long i=a;i<b;i++)
#define REPR(i,a,b) for(long long i=a;i>=b;i--)
#define adb(a) for(auto ii:a) cout << ii << " "; cout << endl
#define adp(a) for(auto ii:a) cout << ii.F << " " << ii.S << endl;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define all(x) (x).begin(),(x).end()
#define endl "\n"
#define mem(a,b) memset(a,b,sizeof(a))
#define mod 1000000007
#define PI 3.14159265358979323846
const ll MAXN = 1000001;
const ll p = 1000000007;
#define N 200003
#define INF INTMAX_MAX

struct hash_pair {
    template <class T1, class T2>
    size_t operator()(const pair<T1, T2>& p) const
    {
        auto hash1 = hash<T1> {}(p.first);
        auto hash2 = hash<T2> {}(p.second);
        return hash1 ^ hash2;
    }
};

ll dx[] = {1, -1, 0, 0};
ll dy[] = {0, 0, 1, -1};

ll power(ll a, ll b, ll m) { ll ans = 1; a = a % m; while (b) { if (b & 1) ans = (ans * a) % m; b /= 2; a = (a * a) % m; } return ans; }

ll lcm(ll a, ll b) { return (a * b) / __gcd(a, b); }

ll modInverse(ll a, ll m) { ll g = __gcd(a, m); return power(a, m - 2, m); }

bool cmp(const pll &a, const pll &b)
{
    if (a.F != b.F) {
        return a.F > b.F;
    }
    else
        return a.S < b.S;
}

// bool check(ll i, ll j)
// {
//     if (i >= 0 && i < n && j >= 0 && j < m && a[i][j] != '#')
//         return true;
//     return false;
// }
ll spf[MAXN];
unordered_map<ll, ll>um;
int flag;

void sieve()
{
    spf[1] = 1;
    for (ll i = 2; i < MAXN; i++)

        // marking smallest prime factor for every
        // number to be itself.
        spf[i] = i;

    // separately marking spf for every even
    // number as 2
    for (ll i = 4; i < MAXN; i += 2)
        spf[i] = 2;

    for (ll i = 3; i * i < MAXN; i++)
    {
        // checking if i is prime
        if (spf[i] == i)
        {
            // marking SPF for all numbers divisible by i
            for (ll j = i * i; j < MAXN; j += i)

                // marking spf[j] if it is not
                // previously marked
                if (spf[j] == j)
                    spf[j] = i;
        }
    }
}

void getFactorization(ll x, ll i)
{
    vector<ll> ret;
    while (x != 1)
    {
        ret.push_back(spf[x]);
        if (!um.count(spf[x]))
        {
            um[spf[x]] = i;
        }
        else
        {
            if (um[spf[x]] != i) {
                flag = 1;
                return;
            }
        }
        x = x / spf[x];
    }
    return;
}

int main()
{

    fastIO;
    int test = 1, num = 1;
    //cin >> test;
    while (test--)
    {
        ll n;
        cin >> n;
        ll a[n];
        REP(i, 0, n) cin >> a[i];
        ll x = a[0];
        REP(i, 1, n) x = __gcd(x, a[i]);
        if (x != 1) {
            cout << "not coprime";
            return 0;
        }
        sieve();
        flag = 0;
        REP(i, 0, n)
        {
            getFactorization(a[i], i);
            if (flag) {
                cout << "setwise coprime";
                return 0;
            }
        }
        cout << "pairwise coprime";
    }
    return 0;
}

Measured memory_bytes: 19276