#include <bits/stdc++.h>


using namespace std;

int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }
#define rep(i,n) for(int i = 0;i<n;i++)


int main(){

    int A,N,t;cin>> N;
    vector<int> ar(N);rep(i,N)cin >> ar[i];
    A = sort(ar.begin(),ar.begin())[N-1];
    vector<int> D(A+1,0);
    
    for (int i = 2;i<=A;i++){
        if (D[i] == 0){
            t = i;
            while (t <= A){
                if (D[t] == 0)D[t]=i;
                t+=i;
            }
        }
    }
    vector<int> E(A+1,0);
    bool b = true;

    rep(i,N){
        vector<int> F(A+1,0);
        t = ar[i];
        while (t > 1){
            if (E[D[t]]==1){
                b = false;
                break;
            }
            F[D[t]]=1;
            t/=D[t];
        }
        if (b == false)break;
        rep(i,A+1){
            E[i]+=F[i];
        }

    }
    if (b){
        cout << "pairwise coprime" << endl;
    }
    else{
        t = ar[0];
        rep(i,N-1)t = gcd(t,ar[i+1]);
        if (t==1){
            cout << "setwise coprime" << endl;
        }
        else cout << "not coprime" << endl;
    }

    

}

