#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    int gcd = 0;
    unordered_map<int, int> mp;
    bool fd = false;
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
        gcd = __gcd(v[i], gcd);

        vector<int> prm;
        int tp = v[i];
        for (int j = 2; j * j <= tp; j++) {
            int ct = 0;
            while (tp % j == 0)tp /= j, ct++;
            if (mp[j] > 0 and ct > 0)fd = true;
            else if (ct > 0)mp[j]++;
        }
        if (tp > 1){
            if(mp[tp])fd = true;
            else mp[tp]++;
        }
    }
    if (!fd)cout << "pairwise coprime";
    else if (gcd == 1)cout << "setwise coprime";
    else cout << "not coprime";
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}