#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define Mp make_pair
#define pb push_back

using ll = long long;
using db = double;
using pii = pair<int, int>;
using vi = vector<int>;
mt19937 mrand(time(0));
ll get(ll r) { return ((ll)mrand() * mrand() % r + r) % r; }
ll get(ll l, ll r) { return get(r - l + 1) + l; }

int n, a[1000100], pri[1000100], tot, v[1000100];
signed main() {
    for(int i = 2; i <= 1e6; i++) {
        if(!pri[i]) pri[++tot] = i;
        for(int j = 1; j <= tot && pri[j] * i <= 1e6; j++) {
            pri[pri[j] * i] = 1;
            if(i % pri[j] == 0) break;
        }
    }
    // printf("%d\n", tot);
    scanf("%d", &n); int cnt = 0;
    for(int i = 1; i <= n; i++) {
        scanf("%d", &a[i]);
        if(a[i] == 1) cnt--;
    }
    int g = a[1];
    for(int i = 1; i <= n; i++) g = __gcd(g, a[i]);
    if(g != 1) return puts("not coprime"), 0;
    if(n - cnt > tot) return puts("setwise coprime"), 0;
    for(int i = 1; i <= n; i++) if(a[i] != 1) {
        for(int j = 1; j <= tot; j++)
            if(a[i] % pri[j] == 0) {
                if(v[j]) return puts("setwise coprime"), 0;
                v[j] = 1;
            }
    }
    puts("pairwise coprime");
    fprintf(stderr, "time=%.4f\n", (db)clock()/CLOCKS_PER_SEC);
    return 0;
    /* 取模直接除，爆零两行泪
     * 不开ll见祖宗
     */
}
