#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define PI 3.14159265359
#define INF 1000100100//000000000
#define MOD 1000000007
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define P pair<int, int>
#define PP pair<P,P>
#define T tuple<int,int,int> 
using namespace std;

struct eratosthenes{
    int n;
    vector<int> l;
    eratosthenes(int n=1):n(n),l(n+1,0){
        for(int i=2; i<=sqrt(n); i++){
            if(l[i]) continue;
            int j=2;
            while(i*j<=n){
                l[i*j]=i;
                j++;
            }
        }
    }
    vector<int> ps(int m){
        vector<int> res;
        int now=m;
        while(l[now]){
            now=now/l[now];
            res.push_back(l[now]);
        }
        reverse(all(res));
        return res;
    }
    vector<int> up(int m){ // m以下の素数全列挙
        vector<int> res;
        for(int i=2; i<=m; i++){
            if(!l[i]) res.push_back(i);
        }
        reverse(all(res));
        return res;
    }
};

int main(){
    int n; cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    eratosthenes e(1000020);
    vector<vector<int> > primes(n);
    rep(i,n){
        primes[i]=e.ps(a[i]);
    }
    vector<int> ca(1000020,0);
    for(vector<int> x : primes){
        for(int y : x){
            ca[y]++;
        }
    }
    bool ok=true;
    rep(i,1000020){
        if(ca[i]>1){
            ok=false;
            break;
        }
    }
    if(ok){
        cout << "pairwise coprime" << endl;
        return 0;
    }

    int now=a[0];
    rep(i,n-1) now=gcd(now,a[i+1]);
    if(now==1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
return 0;
}