#include <bits/stdc++.h>
#include<math.h>
#include<queue>
#include<cstdio>
#include<set>
#include<map>
using namespace std;
using ll = long long;

int main(){
    ll N;
    cin >> N;
    vector<ll> A(N);
    vector<ll> check(1000000,0);
    cin >> A.at(0);
    ll GCD=A.at(0);
    for(ll i=0; i<N; i++){
        cin >> A.at(i);
        GCD=gcd(A.at(i),GCD);
    }
    bool pc=true;
    for(ll j=0; j<N; j++){
        ll n=A.at(j);
        for(ll i=2; i*i<=n; i++){
            if(n%i==0 && (check.at(i) != 0)){
                pc = false;
                break;
            }else if(n%i==0){
                check.at(i)=1;
                while(n%i==0){
            	    n /= i;
                }
            }
        }
        if(n != 1 && check.at(n)!=0){
            pc = false;
        }else if(n!=1){
            check.at(n)=1;
        }
        if(!pc) break;
    }
    if(pc){
        cout << "pairwise coprime";
    }else if(GCD==1){
        cout << "setwise coprime";
    }else{
        cout << "not coprime";
    }
}