#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    vector<int> a(n);
    cin >> a[0];
    int gcd = a[0];
    bool ok = false;
    for (int i=1; i<n; i++){
        cin>>a[i];
        if (!ok) {
            for (int j = 0; j<i; j++) {
                if (__gcd(a[i], a[j]) > 1) {
                    ok = true;
                    break;
                }
            }
        }
        gcd = __gcd(gcd, a[i]);
    }
    if (gcd > 1) cout << "not coprime" << '\n';
    else if (ok) cout << "setwise coprime" << '\n';
    else cout << "pairwise coprime" << '\n';
    return 0;
}