#include <bits/stdc++.h>
using namespace std;
#define pb push_back
using ll = long long;

const int N = 1e6 + 5;
int ar[N], cnt[N];
int n;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    int gc = 0;
    int mx = 0;
    for (int i = 0; i < n; i++) {
        cin >> ar[i];
        mx = max(mx, ar[i]);
        gc = __gcd(gc, ar[i]);
    }
    for (int i = 0; i < n; i++) {
        for (int j = 1; j * j <= ar[i]; j++) {
            if (ar[i] % j == 0) {
                cnt[j]++;
                if (j != ar[i] / j) cnt[ar[i] / j]++;
            }
        }
    }
    bool pwcp = true;
    for (int i = 2; i <= mx; i++) {
        if (cnt[i] > 1) pwcp = false;
    }
    if (pwcp) {
        cout << "pairwise coprime" << '\n';
        exit(0);
    }
    if (gc == 1) {
        cout << "setwise coprime" << '\n';
    } else {
        cout << "not coprime" << '\n';
    }
    return 0;
}