#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using P = pair<i64, i64>;
i64 mod = 1000000007;
int int_max = 2147483647;
i64 INF = 1e16;
int max_n = 1e5;
template <typename T>
T gcd(T a, T b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
template <typename T>
void prime(T x, map<T, T>& cnt) {
  for (T i = 2; i * i <= x; ++i) {
    int c = 0;
    while (x % i == 0) {
      x /= i;
      c++;
    }
    if (c) cnt[i] += c;
  }
  if (x > 1) cnt[x] += 1;
}
int main(int argc, char** argv) {
  i64 n;
  cin >> n;
  vector<i64> a(n, 0), pr(1000000 + 1, 0);
  vector<map<i64, i64>> prime_cnt(n, map<i64, i64>());
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  cout << "0" << endl;
  bool unique{true};
  for (int i = 0; i < n; ++i) {
    map<i64, i64>& cnt = prime_cnt[i];
    prime(a[i], cnt);
    for (auto kv : cnt) {
      if (pr[kv.first] != 0) unique = false;
      ++pr[kv.first];
      if (i == n - 1 && pr[kv.first] == n) {
        cout << "not coprime" << endl;
        return 0;
      }
    }
  }
  if (unique) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
