#include <bits/stdc++.h>
using namespace std;

#define rep(i,n) for(i = 0;i < n;++i)
#define all(v) v.begin(), v.end()
using ll = long long;

int main()
{
    ll i,j;
    ll n;
    cin >> n;
    vector<ll> a(n);
    rep(i,n) cin >> a.at(i);
    ll tmp = a.at(0);
    for(i = 1;i < n;++i){
        tmp = gcd(tmp, a.at(i));
    }
    if(tmp != 1){
        cout << "not coprime" << endl;
        return 0;
    }
    map<ll, ll> mp;
    for(i = 0;i < n;++i){
        for(j = 2;j < sqrt(a.at(i));++j){
            if(a.at(i)%j == 0){
                if(mp.count(j)){
                    cout << "setwise coprime" << endl;
                    return 0;
                }
                ++mp[j];
                while(a.at(i)%j == 0) a.at(i) /= j;
            }
        }
    }
    cout << "pairwise coprime" << endl;
    
    return 0;
}