#include<bits/stdc++.h>
using namespace std;
using lli = long long;
#define rep(i,n) for(int i=0;i<n;i++)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

lli n;

map< int64_t, int > prime_factor(int64_t n) {
  map< int64_t, int > ret;
  for(int64_t i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}

int main(void){
    cin >> n;
    vector<lli> a(n);
    lli g = 0;
    rep(i, n){
        cin >> a[i];
        g = __gcd(g, a[i]);
    }
    if(g != 1){
        cout << "no coprime" << endl;
        return 0;
    }
    map<lli, bool> used;
    rep(i, n){
        auto f = prime_factor(a[i]);
        for(auto i : f){
            if(used[i.first]){
                cout << "setwise coprime" << endl;
                return 0;
            }
            used[i.first] = true;
        }
    }
    cout << "pairwise coprime" << endl;
    return 0;
}
