#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<vector>
#include<numeric>
#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()
using P = pair<i64,i64>;

int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
i32 n;
cin >> n;
vector<i32> a(n);
i32 aa = 0;
rep(i,n) {
    cin >> a[i];
    aa = max(aa,a[i]);
}
vector<bool> is_prime(aa + 1,true);
is_prime[0] = is_prime[1] = false;
vector<i32> rec(aa + 1,1e9);
for(i32 i = 2; i <= aa; i++){
    if(is_prime[i]){
        rec[i] = i;
        for(i32 j = 2 * i; j <= aa; j += i){
            is_prime[j] = false;
            if(rec[j] == 1e9)rec[j] = i;
        }
    }
}
vector<i32> judge(aa + 1);
vector<i32> A = a;
rep(i,n){
    while(A[i] != 1){
        judge[rec[A[i]]]++;
        A[i] /= rec[A[i]];
    }
}
bool b = true;
for(i32 i = 2; i <= aa; i++){
    if(judge[i] >= 2)b = false;
}
i32 k = a[0];
rep(i,n)k = gcd(a[i],k);

if(b && k == 1){
    cout << "pairwise coprime" << endl;
}else if(!b && k == 1){
    cout << "setwise coprime" << endl;
}else{
    cout << "not coprime" << endl;
}
}