#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
template <typename T>
T gcdraw(T a, T b) {
  return a ? gcdraw(b % a, a) : b;
}
template <typename T>
T gcd(T a, T b) {
  const auto aa = abs(a), bb = abs(b);
  return aa > bb ? gcdraw(aa, bb) : gcdraw(bb, aa);
}
const ll MAXN = 1000000;
ll P[MAXN + 1];
bool B[MAXN + 1];
void makePrimeTable() {
  for (ll i = 2; i * i <= MAXN; ++i) {
    if (P[i]) {
      continue;
    }
    for (ll j = i; j <= MAXN; j += i)
      if (!P[j]) {
        P[j] = i;
      }
  }
}
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < ll(N); ++i) {
    cin >> A[i];
  }
  makePrimeTable();
  bool isPairwise = true;
  ll setwiseValue = A[0];
  for (ll i = 0; i < N; ++i) {
    for (ll x = A[i]; x != 1; x /= P[x]) {
      isPairwise &= !B[x];
      B[x] = true;
    }
    setwiseValue = gcd(setwiseValue, A[i]);
  }
  if (isPairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwiseValue == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
