#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>

#define int long long

#define override_rep(i, l, r, mes, ...) mes
#define rep1(i, n) for (int i = 0; i < n; i++)
#define rep2(i, l, r) for (int i = l; i < r; i++)
#define rep(...) override_rep(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)

using namespace std;
using P = pair<int, int>;
using ll = long long;
using ld = double;

using bint = boost::multiprecision::cpp_int;

constexpr int MOD = 1e9 + 7;

template<typename T, typename U>
istream& operator>>(istream& in, pair<T, U>& p) {
    in >> p.first >> p.second;
    return in;
}

vector<int> t(int a){
    vector<int> ret;
    ret.reserve(1001);
    for(int i=2;i*i<=a;i++){
        if(a%i==0){
            ret.push_back(i);
            while(a%i==0)a/=i;
        }
    }
    if(a!=1)ret.push_back(a);
    return ret;
}

// https://twitter.com/vane11ope ←フォローしましょう
// (ノ)>◡<(ヾ)ﾓﾁﾓﾁ
signed main(signed argc, char* argv[]) {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int n;
    cin>>n;

    bool a=true;
    int g;
    set<int> memo;
    cin>>g;
    vector<int> ta=t(g);
    for(auto it:ta){
        memo.insert(it);
    }
    rep(i,n-1){
        int in;
        cin>>in;
        g=gcd(g,in);
        ta=t(in);
        for(auto it:ta){
            if(memo.count(it))a=false;
            memo.insert(it);
        }
    }
    if(a)cout<<"pairwise coprime"<<endl;
    else if(g==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}
