#include"bits/stdc++.h"
using namespace std;

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define eb emplace_back

using ll = long long;
using vll = vector<ll>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using P = pair<int, int>;

vector<pair<ll, int>> factorize(ll n){
    vector<pair<ll, int>> ans;
    if(n == 1) return ans;
    for(ll i = 2; i*i <= n; i++){
        int cnt = 0;
        while(n%i == 0){
            cnt++;
            n /= i;
        }
        if(cnt) ans.eb(i, cnt);
    }
    if(n != 1) ans.eb(n, 1);
    return ans;
}

void Main(){
    int n; cin >> n;
    map<int, ll> cnt;
    rep(i, n) {
        int a; cin >> a;
        for(auto [p, e] : factorize(a)){
            cnt[p]++;
        }
    }
    int mx = 0;
    for(auto [k, v] : cnt){
        mx = max(mx, v);
    }
    if(mx == n) cout << "not coprime" << endl;
    else if(mx == 1) cout << "pairwise coprime" << endl;
    else cout << "setwise coprime" << endl;
    return;
}

int main(){
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Main();
    return 0;
}