#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);
    rep(i,n) cin >> a[i];
    sort(a.begin(),a.end());
    int A = a[n-1];

    vector<bool> ch(A+1,false);
    for(int i=0; i<n; i++){
        ch[a[i]] = true;
    }
    for(int i=2; i<=A; i++){
        int now = 0;
        for(int j=i; j<=A; j+=i){
            if(ch[j]){
                now++;
            }
        }
        if(now >= 2){
            int gcd = 0;
            for(int k=0; k<n; k++) gcd = __gcd(gcd,a[k]);
            if(gcd!=1) cout << "not coprime" << endl;
            else cout << "setwise coprime" << endl;
            return 0;
        }
    }
    cout << "pairwise coprime" << endl;
    return 0;
}
