#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){
    for(auto & b : a){
        vector<int> tmp(b+1);
        for(int i=2;i*i<=b;++i)if(b%i == 0){
            tmp[i]++;
            tmp[b]++;
            if(ret[b] or ret[i] )return false;
            while(b%i == 0){b/=i;tmp[b]++;
                           if(ret[b])return false;}
            if(b != 1)tmp[b]++;
            if(ret[b])return false;
        }
        for(auto t : tmp)if(t > 0)ret[t]= true;
    }
    return true;
}
int main(){
    cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    
    int n;
    cin>>n;
    vector<int> a(n);
    for(auto & b: a) cin>>b;
    
    bool parOk = getPrime(a);
    int allg = a[0];
    for(int i=1;i<n;++i){
        allg =gcd(allg,a[i]);
    }
    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;
    
}
