#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll     = long long;
const ll mod = 1000000007;

ll gcd(ll a, ll b) { return __gcd(a, b); }
ll lcm(ll a, ll b) { return max(a, b) / gcd(a, b) * min(a, b) % mod; }
ll prd(ll a, ll b) { return max(a, b) % mod * min(a, b) % mod; }
int main() {
    ll n;
    cin >> n;
    vector<ll> a(n);
    for (ll& i : a) cin >> i;
    ll alcm = lcm(a[0], a[1]), prod = prd(a[0], a[1]);
    for (int i = 2; i < n; ++i) alcm = lcm(alcm, a[i]), prod = prd(prod, a[i]);
    if (alcm == prod) {
        cout << "pairwise coprime";
        return 0;
    }
    ll agcd = gcd(a[0], a[1]);
    for (int i = 2; i < n; ++i) agcd = gcd(agcd, a[i]);
    if (agcd == 1) {
        cout << "setwise coprime";
        return 0;
    }
    cout << "not coprime";
}