#include <bits/stdc++.h>
#define Phuong_ ios_base::sync_with_stdio(0); cin.tie(0);
#define REP(i,a,b) for(int i=a; i<=b; ++i)

/// easy access -------------
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
typedef pair<int,int> pi;
typedef tuple<int, int, int> tp;
typedef vector<vector<int>> vv;
///-------------------------
vector<int> p;
const int MAXN = 1000;

void init(){
    bool f[MAXN+1];
    memset(f, false, sizeof(f));
    for(int i=2; i<= MAXN; ++i){
        if (f[i]) continue;
        p.push_back(i);
        for(int j=i*i; j<=MAXN; j+=i){
            f[j]=true;
        }
    }
}


int main()
{
    Phuong_; /// <3333
    init();
    vector<int> d(168,0);
    map<int, int> mp;
    int n;
    cin >> n;
    bool f1= true;
    int gcd;
    for(int i=0; i<n; ++i){
        int u;
        cin >> u;
        if (i==0) gcd=u; else gcd = __gcd(gcd, u);
        if (!f1) continue;
        bool can= false;
        for(int j=0; j<p.size(); ++j){
            if (u%p[j]==0){
                d[j]++;
                can=true;
            }
            if (d[j]>=2) f1=false;
        }
        if (!can) mp[u]++;
        if (mp[u]>=2) f1=false;
    }
    if (f1) cout << "pairwise coprime"; else
    if (gcd==1) cout << "setwise coprime"; else cout << "not coprime";
    return 0;
}
