#include<bits/stdc++.h>
#define int long long
#define p pair<int, int>
#define endl '\n'
const int INF = 1000000001;

using namespace std;

vector<int> factor(int n){
    vector<int> ans;
    int sqrt1 = sqrt(n);
    for (int q = 2; q <= sqrt1; q++){
        if (n % q == 0){
            ans.push_back(q);
        }
        while (n % q == 0){
            n /= q;
        }
    }
    if (n != 1){
        ans.push_back(n);
    }
    return ans;
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n;
    cin >> n;
    vector<int> a(n);
    for (int q = 0; q < n; q++){
        cin >> a[q];
    }
    sort(a.begin(), a.end());
    int q1 = 0;
    while (q1 < n && a[q1] == 1){
        q1++;
    }
    int gcd1 = 0;
    for (int q: a){
        gcd1 = __gcd(gcd1, q);
    }
    if (gcd1 != 1){
        cout << "not coprime" << endl;
        return 0;
    }
    int max1 = *max_element(a.begin(), a.end());
    vector<int> d(max1+1, 0);
    /*if (n-q1 > 200000){
        cout << "setwise comprime" << endl;
        return 0;
    }*/
    bool flag = true;
    while (q1 < n){
        vector<int> fact = factor(a[q1]);
        for (int q: fact){
            if (++d[q] > 1){
                flag = false;
                break;
            }
        }
        if (!flag){
            break;
        }
        q1++;
    }
    cout << (flag ? "pairwise coprime" : "setwise comprime") << endl;
    return 0;
}
