#include <bits/stdc++.h>
using namespace std;
template <class T>
using PQ_inv = priority_queue<T, vector<T>, greater<T>>;
const double pai = 3.1415926535897;
const long long mod = 1000000007;
const long long INF = 1000000021;
const long long LINF = 2000000000000000000;
const long long MAX = 510000;
const long long MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (long long i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}
long long COM(long long n, long long k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long PER(long long n, long long k) {
  if (n < 0 || k < 0) return 0;
  if (n < k) return fac[n];
  return fac[n] * finv[n - k] % mod;
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
long long modpow(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
struct edge {
  long long to, cost;
};
edge m_e(long long xx, long long yy) {
  edge ed;
  ed.to = xx;
  ed.cost = yy;
  return ed;
}
long long b_s(vector<long long>& vec, long long xx) {
  return lower_bound(vec.begin(), vec.end(), xx) - vec.begin();
}
template <class T>
void vecout(vector<T>& vec) {
  for (T t : vec) cout << t << " ";
  cout << "\n";
}
template <class T>
void vecin(vector<T>& vec) {
  for (long long i = 0; i < vec.size(); i++) cin >> vec[i];
}
bool chmax(long long& xx, long long yy) {
  if (xx < yy) {
    xx = yy;
    return true;
  }
  return false;
}
bool chmin(long long& xx, long long yy) {
  if (xx > yy) {
    xx = yy;
    return true;
  }
  return false;
}
double dist(long long x, long long y) { return sqrt(x * x + y * y); }
double dist(long long xx1, long long xx2, long long yy1, long long yy2) {
  return sqrt(abs(xx1 - xx2) * abs(xx1 - xx2) +
              abs(yy1 - yy2) * abs(yy1 - yy2));
}
long long mypow(long long nn, long long kk) {
  long long xx = 1;
  for (long long i = 0; i < (long long)(kk); i++) {
    xx *= nn;
  }
  return xx;
}
long long gcd(long long xx, long long yy) {
  long long p = xx;
  long long q = yy;
  if (q > p) swap(p, q);
  while (p % q != 0) {
    p %= q;
    swap(p, q);
  }
  return q;
}
long long lcm(long long xx, long long yy) { return xx * yy / gcd(xx, yy); }
bool prime(long long xx) {
  if (xx <= 1) {
    return 0;
  }
  for (long long i = 2; i * i <= xx; i++) {
    if (xx % i == 0) {
      return 0;
    }
  }
  return 1;
}
signed main() {
  long long n, a;
  cin >> n;
  vector<long long> vec(n);
  set<long long> se;
  vecin(vec);
  for (long long i = 0; i < (long long)(n); i++) {
    a = vec[i];
    long long j = 2;
    while (a > 1) {
      if (!prime(j)) continue;
      if (a % j == 0) {
        if (se.count(j)) {
          goto skip;
        }
        se.insert(j);
      }
      while (a % j == 0) {
        a /= j;
      }
      if (j * j > a) {
        if (se.count(a)) {
          goto skip;
        }
        se.insert(a);
        break;
      }
      j++;
    }
  }
  cout << "pairwise coprime"
       << "\n";
  return 0;
skip:;
  long long b = vec[0];
  for (long long i = 1; i < n; i++) {
    b = gcd(b, vec[i]);
    if (b == 1) {
      cout << "setwise coprime"
           << "\n";
      return 0;
    }
  }
  cout << "not coprime"
       << "\n";
}
