#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
const ll MAXN = 1000001;
bool P[MAXN];
bool S[MAXN];
vector<ll> PS;
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);
}
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < ll(N); ++i) {
    cin >> A[i];
  }
  for (ll i = 2; i * i <= MAXN; ++i)
    if (!P[i]) {
      for (ll j = 2 * i; j <= MAXN; j += i) {
        P[j] = true;
      }
      PS.emplace_back(i);
    }
  bool isPairwise = true;
  bool isSetwise = true;
  ll cur = A[0];
  for (ll i = 0; i < N; ++i) {
    if (isPairwise)
      for (const auto& p : PS) {
        if (p * p > A[i]) {
          break;
        }
        if (A[i] % p) {
          continue;
        }
        const auto x = p;
        const auto y = A[i] / p;
        if (S[x] || S[y]) {
          isPairwise = false;
          break;
        }
        S[x] = true;
        S[y] = true;
      }
    cur = gcd(cur, A[i]);
  }
  isSetwise = cur == 1;
  if (isPairwise) {
    cout << "pairwise coprime" << endl;
  } else if (isSetwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
