#include <bits/stdc++.h>
#include <vector>
#include <queue>
#include <set>
#include <iostream>
#include <iomanip>
using namespace std;
typedef unsinged long long LL;
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)


LL gcd(LL val1, LL val2){
    LL _val_lrg = (val1 > val2)? val1: val2;
    LL _val_sml = (val1 > val2)? val2: val1;

    LL r = _val_lrg % _val_sml;
    if(r==0){
        return _val_sml;
    }else{
        return gcd(_val_sml, r);
    }
}

int main(){
    int N;
    cin >> N;
    vector<LL> A(N);
    REP(i,N)cin>>A[i];

    sort(A.begin(), A.end());
    LL val = 1;
    REP(i, N){
        val *= A[i];
    }

    bool bl_pairwise_coprime = true;
    REP(i, N-1){
        val /= A[i];
        LL tmp = gcd(A[i], val);
        if(tmp != 1){
            bl_pairwise_coprime = false;
            break;
        }
    }

    LL val = A[0];
    REP(i, N-1){
        val = gcd(val, A[i+1]);
        if(val==1)break;
    }
    bool bl_setwise_coprime = (val==1)? true: false;

    if(bl_pairwise_coprime){
        cout << "pairwise coprime" << endl;
    }else if (bl_setwise_coprime){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }
    return 0;
}