#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <typename T>
inline bool chmax(T &a, T b) {
  return ((a < b) ? (a = b, true) : (false));
}
template <typename T>
inline bool chmin(T &a, T b) {
  return ((a > b) ? (a = b, true) : (false));
}
constexpr ll INF = (1ll << 59);
constexpr ll MOD = 1000000007ll;
ll llgcd(ll a, ll b) {
  if (b == 0) {
    return a;
  }
  return llgcd(b, a % b);
}
ll lllcm(ll a, ll b) {
  if (a == 0 || b == 0) {
    return 1;
  }
  return a / llgcd(a, b) * b;
}
vector<pair<ll, ll>> prime_factorization(ll n) {
  vector<pair<ll, ll>> res;
  if (n < 2) {
    res.push_back(make_pair(n, 1));
    return res;
  }
  for (ll i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      pair<ll, ll> pr;
      pr.first = i;
      pr.second = 1;
      while (n % i == 0) {
        n /= i;
        pr.second++;
      }
      res.push_back(pr);
    }
  }
  if (n != 1) {
    res.push_back(make_pair(n, 1));
  }
  return res;
}
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = (0); i < (n); i++) {
    cin >> a[i];
  }
  bool tagainiso = false;
  ll nowval = a[0];
  for (ll i = (1); i < (n); i++) {
    nowval = llgcd(nowval, a[i]);
  }
  if (nowval == 1) {
    tagainiso = true;
  }
  bool tuigotoniso = true;
  set<ll> st;
  for (ll i = (0); i < (n); i++) {
    vector<pair<ll, ll>> soinsu = prime_factorization(a[i]);
    ll len = soinsu.size();
    for (ll i = (0); i < (len); i++) {
      if (st.count(soinsu[i].first) == 1) {
        tuigotoniso = false;
        goto END;
      }
      st.insert(soinsu[i].first);
    }
  }
  tuigotoniso = true;
END:
  if (tuigotoniso == true) {
    cout << "pairwise coprime" << endl;
  } else if (tagainiso == true) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
