#include <bits/stdc++.h>

using namespace std;
using ll = long long;
const ll MOD = 1000000007;
const ll LNF = __LONG_LONG_MAX__;

int main(){
    int N; cin >> N;
    vector<int> A(N);
    int res=0;
    cin >> A[0];
    res = A[0];
    int pp=A[0];
    bool f=true;
    for(int i=1;i<N;i++){
        cin >> A[i];
        res = gcd(A[i],res);
        if(f){
            if(gcd(A[i-1],A[i])!=1) f=false;
        }
    }
    if(f){
        cout << "pairwise coprime" << endl;
    }else if(res==1){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }
    return 0;
}
