#include <bits/stdc++.h>
using namespace std;
template <typename T>
long long modpow(const T n, const T p, const T mod);
template <typename T>
long long modinv(const T n, const T mod);
template <typename T>
bool chmax(T &a, const T &b);
template <typename T>
bool chmin(T &a, const T &b);
long long inf = 1000000007;
int main() {
  vector<vector<long long>> memo(1000001);
  vector<bool> sosu(1000001, true);
  sosu.at(0) = false;
  sosu.at(1) = false;
  for (long long i = 2; i <= 1000000; i++) {
    if (sosu.at(i) == false) continue;
    for (long long j = i * 2; j <= 1000000; j += i) {
      sosu.at(j) = false;
    }
  }
  long long n;
  cin >> n;
  vector<long long> v(n);
  set<long long> soinsu;
  map<long long, long long> zisyo;
  string ans = "pairwise coprime";
  for (long long i = 0; i < n; i++) cin >> v.at(i);
  sort(v.begin(), v.end());
  for (auto a : v) {
    long long now = a;
    if (sosu.at(now)) {
      soinsu.insert(now);
      zisyo[now]++;
      memo.at(now).push_back(now);
      continue;
    }
    for (long long i = 2; i * i <= now; i++) {
      if (memo.at(now).size() != 0) {
        for (auto b : memo.at(now)) {
          zisyo[b]++;
          memo.at(a).push_back(b);
        }
        break;
      }
      if (now % i == 0) {
        soinsu.insert(i);
        zisyo[i]++;
        memo.at(a).push_back(i);
        now %= i;
      }
    }
    if (now != 1) {
      soinsu.insert(now);
      zisyo[now]++;
      memo.at(a).push_back(now);
    }
  }
  for (auto it = soinsu.begin(); it != soinsu.end(); it++) {
    if (zisyo.at(*it) >= 2) ans = "setwise coprime";
    if (zisyo.at(*it) >= n) ans = "not coprime";
  }
  cout << ans << endl;
  return 0;
}
template <typename T>
long long modpow(const T n, const T p, const T mod) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    long long a = modpow(n, p / 2, mod);
    return a * a % mod;
  }
  if (p % 2 == 1) return (modpow(n, p - 1, mod) * n) % mod;
  cerr << "ERROR" << endl;
  return 1;
}
template <typename T>
long long modinv(const T n, const T mod) {
  return modpow(n, mod - 2, mod);
}
template <typename T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
