#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
typedef pair<int,int> P;
typedef long long ll;
const int INF = 1001001001;
const ll INFL = 1e17;
const int MOD = 1e9+7;


int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    vector<int> e(1000001);

    rep(i,n){
        cin >> a[i];
        e[a[i]]++;
    }
    bool pairwise = true;
    for(int i=2; i<=1000001; i++){
        int count = 0;
        for(int j=i; j<=1000001; j+=i){
            count += e[j];
        }
        if(count >= 2) pairwise = false;
    }

    if(pairwise){
        cout << "pairwise coprime" << endl;
        return 0;
    }
    int gcda = 0;
    rep(i,n) gcda = __gcd(gcda,a[i]);
    if(gcda==1) cout << "not coprime" << endl;
    else cout << "setwise coprime" << endl;
    return 0;
}