#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<vector>
#include<numeric>
#include<cmath>
#include<algorithm>
using namespace std;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
#define rep(i, n) for (i32 i = 0; i < (i32)(n); i++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
vector<i32> rec(1000001);
using P = pair<i64,i64>;
using ll = i64;
void factrize(ll n)
{
    for (ll i = 2; i <= sqrtl(n); i++)
    {
        ll k = i;
        ll cnt = 0;
        while (n % k == 0)
        {
            n /= k;
            cnt++;
        }
        rec[k] += cnt;
    }
    if (n != 1)
    {
        rec[n]++;
    }
}
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
i32 n;
vector<i32>a(n);
rep(i,n)cin >> a[i];
rep(i,n){
    factrize(a[i]);
}
bool check = true;
for(i32 i = 2; i < rec.size(); i++){
    if(rec[i] >= 2)check = false;
}
i32 k = a[0];
rep(i,n){
    k = gcd(k,a[i]);
}
if(check && k == 1){
    cout << "pairwise coprime" << endl;
}else if(!check && k == 1){
    cout << "setwise coprime" << endl;
}else{
    cout << "not coprime" << endl;
}
}