#include <bits/stdc++.h>
using namespace std;
#define pr(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define all(v) (v).begin(), (v).end()
#define int long long
#define sz(v) (int)(v).size()
#define mod 1000000007 // ((a- b)% mod+ mod)% mod

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}

void solve() {
        int n; cin >> n;
        int gc= 0;
        vector<int> v(n);
        for (int i= 0; i< n; i++) {
                cin >> v[i];
                gc= __gcd(gc, v[i]);
        }
        if (gc!= 1) {
                cout << "not coprime\n";
        } else {
                map<int, int> mp;
                auto calc= [&](int nm)->bool {
                        for (int i= 2; i<= nm; i++) {
                                if (nm% i== 0&& mp.count(i)) {
                                        return 1;
                                } else {
                                        if (nm% i== 0) {
                                                mp[i]++;
                                                while (nm% i== 0) nm/= i;
                                        }
                                }
                        }
                        if (nm> 1) {
                                if (mp.count(nm)) return 1;
                                else mp[nm]++;
                        }
                        return 0;
                };

                for (int i= 0; i< n; i++) {
                        if (calc(v[i])) {
                                cout << "setwise coprime\n";
                                exit(1);
                        }
                }
                cout << "pairwise coprime\n";
        }
}

int32_t main(){
ios::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
        int T= 1;
        //cin >> T;
        while ( T-- ) {
                solve();
        }
return 0;
}
