#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const double eps = 0.00001;
const int MOD = 1000000007; //998244353
const int INF = 1070000055;
const long long LINF = 1223372000000000555;
const int N = 1050555;
const int M = 6525;

int a[N];
vector<int> v[N];
int cnt[N];
void solve(){
    int n;
    cin >> n;

    int g = 0;
    for (int i = 1; i <= n; i++){
        cin >> a[i];
        g = __gcd(g, a[i]);
    }

    for (int i = 2; i <= 1e6; i++){
        if (v[i].size() > 0) continue;
        v[i] = {i};
        for (int j = i + i; j <= 1e6; j += i){
            v[j].push_back(i);
        }
    }

    for (int i = 1; i <= n; i++){
        for (int x : v[a[i]]){
            cnt[x]++;
        }
    }

    if (*max_element(cnt, cnt + N) == 1){
        cout << "pairwise coprime";
        return;
    }

    if (g == 1){
        cout << "setwise coprime";
        return;
    }

    cout << "not coprime";

}


int main() {
    ios_base::sync_with_stdio(false);
#ifdef dddxxz
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else

#endif

    int T = 1;
    //cin >> T;

    while (T--) {
        solve();
    }

    return 0;
}