#include<iostream>
#include<vector>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
const int mod = 1'000'000'007;
int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,n){
        cin >> a[i];
    }
    vector<int> c(1000005);
    rep(i,n){
        for(int j = 2;j * j <= a[i];j++){
            if(a[i] % j == 0){
                c[j]++;
            }
        }
    }
    bool pairwise = true;
    for(int i = 1000004;i >= 2;i--){
        if(c[i] == n){
            cout << "not comprime" << endl;
            return 0;
        }
        if(c[i] >= 2){
            pairwise = false;
        }
    }
    if(pairwise){
        cout << "pairwise comprime" << endl;
    }else{
        cout << "setwise comprime" << endl;
    }

}