#include <bits/stdc++.h>

using namespace std;
typedef long long int ll;
typedef long double ld;
#define EPS 0.0000000001
#define pb push_back
#define space " "
#define ar array
#define pi pair<int,int>
#define ff first
#define ss second

void solve() {
    int n;
    int maxN = 1000000;
    cin >> n;
    bool pairwise = true;
    bool setwise = true;
    vector<int> a(n), f(1000000 + 1, 0), s(1000000 + 1, 1);
    vector<int> primes;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        f[a[i]]++;
        if ((a[i] != 1) && (f[a[i]] > 1)) {
            pairwise = false;
        }
    }
    int g = a[0];
    for (int i = 1; i < n; i++) {
        g = __gcd(a[i], g);
    }
    if (g != 1) setwise = false;

    if (pairwise) {
        s[0] = 0;
        s[1] = 0;
        for (int i = 2; i <= maxN; i++) {
            if (s[i] == 1) {
                primes.push_back(i);
                for (ll j = i * 1ll * i; j <= maxN; j += i) {
                    s[j] = 0;
                }
            }
        }
        for (auto p : primes) {
            int cnt = 0;
            for (int i = p; i <= maxN; i += p) {
                if (f[i] > 0) cnt++;
                if (cnt > 1) {
                    pairwise = false;
                }
            }
            if (!pairwise) {
                break;
            }
        }


    }
    if (pairwise) {
        cout << "pairwise comprime" << endl;
    } else if (setwise) {
        cout << "setwise comprime " << endl;
    } else {
        cout << "not coprime" << endl;
    }
}

int main() {
//    freopen("input.txt" , "r" , stdin) ;
//    freopen("output.txt" , "w" , stdout) ;
    int q = 1;
    // cin >> q;
    while (q--) {
        solve();
    }
    return 0;
}