#include <bits/stdc++.h>
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
using ll = long long;
using ld = long double;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
using namespace std;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll a[1100000];
map<ll, ll> x;
map<ll, ll> y[1100000];
int main() {
  ll n;
  cin >> n;
  for (ll i = ll(0); i < ll(n); i++) cin >> a[i];
  for (ll i = ll(0); i < ll(n); i++) {
    ll p = a[i];
    ll cnt = 2;
    while (cnt * cnt <= p) {
      if (p % cnt == 0) {
        x[cnt]++;
        p /= cnt;
        y[i][cnt]++;
      } else
        cnt++;
    }
    if (p > 1) x[p]++;
  }
  bool pc = true;
  bool sc = false;
  for (ll i = ll(0); i < ll(n); i++) {
    for (auto k : y[i]) {
      ll pos = k.first;
      ll pos2 = k.second;
      if (x[pos] > pos2) pc = false;
    }
  }
  if (!pc) {
    ll q = a[0];
    for (ll i = ll(1); i < ll(n); i++) q = gcd(q, a[i]);
    if (q == 1) sc = true;
  }
  if (pc)
    cout << "pairwise coprime";
  else if (sc)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
