#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

int main() {
	int n;
    cin >> n;
    vector<int> a(n);
    ll all;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        if(i == 0) all = a[i];
        else all = gcd(all, a[i]);
    }
    
    unordered_set<int> seen;
    bool pc = true;
    for (int i = 0; i < n; ++i) {
        int tmp = a[i];
        for (int j = 2; j * j <= tmp; ++j) {
            if(tmp > 1 && tmp % j == 0 && seen.count(j)) {
                pc = false;
                break;
            }
            while(tmp > 1 && tmp % j == 0) {
                seen.insert(j);
                tmp /= j;
            }
        }
        if(tmp > 1 && seen.count(tmp)) ps = false;
        else if(tmp > 1) seen.insert(tmp);
        if(!pc) break;
    }

    if(pc) puts("pairwise coprime");
    else if(all == 1ll) puts("setwise coprime");
    else puts("not coprime");
}
