#include<bits/stdc++.h>

using ll = long long;
using ull = unsigned long long;
using namespace std;
constexpr int inf = 1<<30;
constexpr int mo = 1e9+7;
constexpr ll infl = 1ll<<60;

array<bool,1000050> ret{};
bool getPrime(vector<int> &a){
    map<int,int> m;
    for(auto & b : a){
        m.clear();
        for(int i=2;i*i<=b;++i)if(b%i == 0){
            m[i]++;
            m[b]++;
            if(ret[b] or ret[i] )return false;
            while(b%i == 0){b/=i;m[b]++;
                           if(ret[b])return false;}
        }
        if(b != 1)m[b]++;
        if(ret[b])return false;
        for(auto cur : m)ret[cur.first]= true;
    }
    return true;
}
int main(){
    cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    
    int n;
    cin>>n;
    vector<int> a(n);
    int allg =0;
    for(auto & b: a) cin>>b,allg=gcd(allg,b);
    
    bool parOk = getPrime(a);
    bool setOk = true;
    if(allg != 1)setOk = false;
    
    string ret;
    if(parOk){
        ret = "pairwise coprime";
    }else if(setOk){
        ret = "setwise coprime";
    }else ret = "not coprime";
    cout << ret << endl;
    return 0;
    
}
