#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--)
#define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++)
#define rrep2(ri,x,n) for(int ri = (int)(n-1); ri >= (int)(x); ri--)
#define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using namespace std;

map<ll, ll> prime_factorization(ll n, set<int> &ps){
  map<ll, ll> ans;
  if(ps.find(n) != ps.end()){
    ans[n]++;
    return ans;
  }
  auto itr = ps.begin();
  while(n >= (*itr)*(*itr)){
    if(n % (*itr) == 0){
      ans[(*itr)]++;
      n /= (*itr);
      if(ps.find(n) != ps.end()){
        ans[n]++;
        return ans;
      }
    }else{
      itr++;
    }
  }
  ans[n]++;
  return ans;
}

set<int> make_prime_set(int lim){
  set<int> ps;
  vector<bool> chk(lim+1, true);
  chk.at(0) = chk.at(1) = false;
  rep2(i, 2, chk.size()){
    if(chk.at(i) == false) continue;
    ps.insert(i);
    for(int j = i+i; j < chk.size(); j +=i) chk.at(j) = false;
  }
  return ps;
}

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i, n) cin >> a.at(i);
  auto ps = make_prime_set(1e6+5);
  set<int> ups;
  bool f = false;
  for(auto now : a){
    auto rs = prime_factorization(now, ps);
    for(auto p : rs){
      if(ups.find(p.first) != ups.end()){
        f = true;
        break;
      }else{
        ups.insert(p.first);
      }
    }
    if(f == true) break;
  }
  if(f == false){
    cout << "pairwise coprime" << endl;
    return 0;
  }

  int g = a.front();
  rep2(i, 1, a.size()){
    g = __gcd(g, a.at(i));
  }
  if(g == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
  return 0;
}