#include <bits/stdc++.h>

#define rep(X,N) for(ll X = 0LL; X < (N); X++)
#define ALL(V) (V).begin(),(V).end()
#define endl "\n"

using namespace std;
typedef long long ll;

const double PI = 3.1415926535897932384626;
const ll MODN = 1000000007;
const ll MODN2 = 998244353;
const double EPS = 1e-10;

int main(){

    int n;
    cin >> n;
    vector<int> a(n);

    rep(i, n){
        cin >> a[i];
    }

    int allgcd = a[0];

    rep(i, n){
        allgcd = __gcd(allgcd, a[i]);
    }


    vector<bool> traversed(1000001, false);
    bool pairwise = true;

    sort(ALL(a));

    //cerr << "check" << endl;

    rep(i, n){
        traversed[a[i]] = true;
    }

    for(int i = 2; i <= 1000000; i++){
        int count = 0;
        for(int j = i; j <= 1000000; j = j + i){
            if(traversed[j]) count++;
        }

        //cerr << i << " " << count << endl;
        if(count > 1){
            pairwise = false;
            break;
        }
    }

    if(pairwise){
        assert(false);
        cout << "pairwise coprime" << endl;
    }else if(allgcd == 1){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }
    
    return 0;

}
