#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1.0);
const ll MOD = 1e9 + 7;
const ll INF = 100000000000000;
void printv(vector<ll> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " \n"[i == v.size() - 1];
}
class smart_sieve {
  ll L, R, M;
  vector<int> small;
  vector<vector<ll>> large;
  vector<ll> aux;

 public:
  smart_sieve(ll L, ll R) : L(L), R(R), M(sqrt(R) + 1) {
    small.resize(M);
    iota(small.begin(), small.end(), 0);
    large.resize(R - L);
    aux.assign(R - L, 1);
    for (ll i = 2; i * i < R; ++i) {
      if (small[i] < i) continue;
      small[i] = i;
      for (ll j = i * i; j < M; j += i)
        if (small[j] == j) small[j] = i;
      for (ll j = (L + i - 1) / i * i; j < R; j += i) {
        ll k = j;
        do {
          if (aux[j - L] * aux[j - L] > R) break;
          large[j - L].push_back(i);
          aux[j - L] *= i;
          k /= i;
        } while (k % i == 0);
      }
    }
  }
  vector<ll> factor(ll n) {
    assert(L <= n && n < R);
    vector<ll> res = large[n - L];
    n /= aux[n - L];
    if (n >= M) {
      res.push_back(n);
      return res;
    }
    while (n > 1) {
      res.push_back(small[n]);
      n /= small[n];
    }
    return res;
  }
};
ll b[1000005];
int main() {
  smart_sieve ss(1, 1000000);
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  for (ll i = 0; i < n; i++) {
    vector<ll> fac = ss.factor(a[i]);
    set<ll> factor;
    for (auto it : fac) factor.insert(it);
    for (auto it : factor) b[it]++;
  }
  int f = 0;
  for (ll i = 1; i <= 1000000; i++) {
    if (b[i] >= 2) f = 1;
    if (b[i] == n) {
      cout << "not coprime"
           << "\n";
      return 0;
    }
  }
  if (f == 0)
    cout << "pairwise coprime"
         << "\n";
  if (f == 1)
    cout << "setwise coprime"
         << "\n";
  return 0;
}
