#include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define rmin(r, x) r = min(r, x);
#define rmax(r, x) r = max(r, x);
#define ends ' '
#define endl '\n'
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int maxn = 1e6 + 10;
const int maxa = 1e6 + 10;

int n, a[maxn], c[maxa], p[maxa];
vector<int> prime;

void era(void) {
    for(int i = 2; i <= 1000; ++i) if(!p[i]) {
        prime.eb(i);
        for(int j = i * i; j <= 1000; j += i)   p[j] = 1;
    }
}

int main(void) {
    fastio;
    cin >> n;
    for(int i = 1; i <= n; ++i) {
        cin >> a[i];
        ++c[a[i]];
    }
    int g = a[1];
    for(int i = 2; i <= n; ++i) g = __gcd(g, a[i]);

    bool valid = true;
    for(int i = 1; i < maxa; ++i)   valid &= (c[i] <= 1);

    if(g != 1) {
        cout << "not coprime";
        return 0;
    }
    if(!valid) {
        cout << "setwise coprime";
        return 0;
    }

    era();
    valid = true;
    memset(c, 0, sizeof(c));
    for(int i = 1; i <= n; ++i) {
        for(auto x : prime) if(a[i] % x == 0) {
            valid &= !c[x];
            ++c[x];
        }
    }
    cout << (valid ? "pairwise coprime" : "setwise coprime");
    return 0;
}
