#include <bits/stdc++.h>
#include <iostream>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

map<P, ll> memo;

ll gcd(ll a, ll b) {
    if (memo[P(a, b)] != 0) {
        return memo[P(a, b)];
    }
    ll g = __gcd(a, b);
    memo[P(a, b)] = g;
    memo[P(b, a)] = g;
    return g;
}

int main() {
    ll N;
    cin >> N;

    ll A[1000000+1];
    ll g1;
    for (ll i = 1; i <= N; i++) {
        cin >> A[i];
        if (i == 1) {
            g1 = A[i];
        } else {
            g1 = gcd(g1, A[i]);
        }
    }

    for (ll i = 1; i <= N-1; i++) {
        for (ll j = i+1; j <= N; j++) {
            if (gcd(A[i], A[j]) != 1)  {
                if (g1 == 1) {
                    cout << "setwise coprime\n";
                    return 0;
                } else {
                    cout << "not coprime\n";
                    return 0;
                }               
            }
        }
    }

    cout << "pairwise coprime\n";
}