#include <bits/stdc++.h>
const int INF = 2147483647;
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
map<ll, ll> prime_factorize(long long N) {
  map<ll, ll> res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res[a] = 1;
  }
  if (N != 1) res[N] = 1;
  return res;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  ll n;
  cin >> n;
  vector<ll> a(n, 0);
  for (long long i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  bool b = true;
  vector<map<ll, ll>> pr(n);
  map<ll, ll> all_coprime;
  for (long long i = 0; i < (n); ++i) {
    pr[i] = prime_factorize(a[i]);
    for (auto j : pr[i]) all_coprime[j.first]++;
  }
  bool pairwise = true;
  for (long long i = 0; i < (n); ++i) {
    for (auto p : pr[i]) {
      if (all_coprime[p.first] - p.second > 0) {
        pairwise = false;
        break;
      }
    }
  }
  bool setwise = true;
  for (auto j : all_coprime)
    if (j.second > 2) {
      setwise = false;
      break;
    }
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (setwise)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
