#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
using namespace std;
const long long INF = 1LL << 60;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main(){
    int N;
    cin >> N;
    vector<int> A(N);
    rep(i, N) cin >> A.at(i);
    int g[N][N];
    int gall = A.at(0);

    bool pc = true;

    for(int i=0;i<N-1;i++){

        for(int j=i+1;j<N;j++){
            g[i][j] = gcd(A[i],A[j]);
            if(g[i][j]!=1) pc = false;
            gall = gcd(gall,g[i][j]);
        }
    }

    if(pc){
        cout << "pairwise comprime" << endl;
    }else if(!pc&&gall==1){
        cout << "setwise comprime" << endl;
    }else{
        cout << "not comprime" << endl;
    }
}