#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);
i64 lim = 0;
rep(i,n){
    cin >> a[i];
    lim = max(lim,a[i]);
}
vector<i32>rec(lim * 2 + 1,0);
rep(i,n) {
    for(i32 j = 1; j * a[i] <= 2 * lim;++j){
        ++rec[a[i] * j];
    }
}
bool as = true;
rep(i,lim * 2 + 1){
    if(rec[i] > 1)as = false;
}
i32 k = a[0];
rep(i,n)k = gcd(k,a[i]);
if(as && k == 1){
    cout << "pairwise coprime" << endl;
}else if(!as && k == 1){
    cout << "setwise coprime" << endl;
}else{
    cout << "not coprime" << endl;
}
}