#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define mp  make_pair
#define pb  push_back
#define endl "\n"
#define rep(i,a,n) for(int i=a;i<n;i++)
const int mod = 1e9 + 7;
void solve() {
    int m ;
    cin >> m;
    int a[m];
    int g = 0;
    rep(i, 0, m) {
        cin >> a[i];
        if (i >= 1) {
            g = __gcd(g, a[i]);
        }
        else {
            g = a[0];
        }
    }
    int s=0;
    for (int i = 0; i < m and s != 1; i++) {
        for (int j = i + 1; j < m and s != 1; j++) {
            if (__gcd(a[i], a[j]) != 1) {
                s = 1;
                break;
            }
        }
    }
    if (s != 1) {
        cout << "pairwise coprime" << endl;
        return;
    }
    else if (s == 1 and g == 1) {
        cout << "setwise coprime" << endl;
        return;
    }
    else {
        cout << "not coprime" << endl;
        return;
    }
}
int32_t main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output1.txt", "w", stdout);
#endif
    int t;
    // cin >> t;
    t = 1;
    while (t--) {
        solve();
    }
    return 0;
}

