#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
const ll MAXN = 1000000;
ll P[MAXN];
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];
  }
  bool isPairwise = true;
  bool isSetwise = true;
  ll cur = A[0];
  for (ll i = 0; i < N; ++i) {
    for (ll j = 2; j * j <= A[i]; ++j) {
      if ((A[i] % j) != 0) {
        continue;
      }
      const auto x = j;
      const auto y = A[i] / j;
      if (P[x] != 0 || P[y] != 0) {
        isPairwise = false;
      }
      ++P[x];
      ++P[y];
    }
    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;
}
