#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, k, n) for (int i = k; i < (int)(n); i++)
#define repd(i, n) for (int i = n-1; i >= 0; i--)
#define rrepd(i, k, n) for (int i = n-1; i >= (int)(k); i--)
#define all(x) (x).begin(),(x).end()
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
//V,Pは大文字i,l,bは小文字
using ll = long long;
using Vi = vector<int>;
using VVi = vector<Vi>;
using Vl = vector<ll>;
using VVl = vector<Vl>;
using Vb = vector<bool>;
using VVb = vector<Vb>;
using P = pair<int,int>;
using Pll = pair<ll, ll>;
const ll mod = 1000000007;
const ll inf = 1000000000000;//10の12乗
// GCD, LCM
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int main() {
    int n;
    cin >> n;
    vector<int> v(n);
    rep(i,n) cin >> v[i];
    vector<int> prime(3000001,0);
    rep(i,1000001){
        if(i==0||i==1) continue;
        int x=i;
        if(prime[x]==0){
            while(x<=1000000){
                x+=i;
                prime[x]--;
            }
        }
    }
    bool b=1;
    ll cnt=0;
    rep(i,n){
        int x=v[i];
        for(int j=2; j<=1000; j++){
            if(x%j!=0) continue;
            int y=x/j;
            if(j!=1&&prime[j]>=1) b=0;
            if(y!=1&&prime[y]>=1) b=0;
            if(j!=1&&prime[j]>=0){
                prime[j]++;
                cnt++;
            }
            if(y!=1&&prime[y]>=0){
                prime[y]++;
                cnt++;
            }
        }
        
    }
    if(b){
            cout << "pairwise coprime" << endl;
            return 0;
        }
    }
    int g=v[0];
    rep(i,n){
        g=gcd(g,v[i]);
    }
    if(g==1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
}