#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e6 + 50;
int n;
ll a[maxn];
map<ll, ll> mp;
int main()
{
    std::ios::sync_with_stdio(false);
    cin >> n;
    for(int i = 0;i < n;i++){
        cin >> a[i];
    }
    ll gcd = a[0];
    for(int i = 1;i < n;i++){
        gcd = __gcd(gcd, a[i]);
    }
    bool ok = true;
    for(int i = 0;i < n;i++){
        ll now = a[i];
        ll sq = sqrt(a[i]);
        for(ll j = 2;j <= sq;j++){
            if(now % j == 0){
                if(mp.count(j) || mp.count(now / j)){
                    ok = false;
                    break;
                }

                mp[j] = 1;
                if(j * j != now)
                mp[now / j] = 1;
            }
        }
        if(!ok) break;
    }
    if(ok) cout << "pairwise coprime\n";
    else if(gcd == 1LL) cout << "setwise coprime\n";
    else cout << "not coprime\n";
    return 0;
}
