#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, unsigned long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) {
      res = res * x;
    }
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long int powermod(long long int x, unsigned long long int y,
                       long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % p;
    }
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int spf[1000005];
void sieve() {
  spf[1] = 1;
  for (long long int i = 2; i < 1000005; i++) spf[i] = i;
  for (long long int i = 4; i < 1000005; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < 1000005; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < 1000005; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
set<long long int> getFactorization(long long int x) {
  set<long long int> ret;
  while (x != 1) {
    ret.insert(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
void solve() {
  sieve();
  long long int n, temp;
  cin >> n;
  set<long long int> pfs[n + 5];
  map<long long int, long long int> allpfs;
  for (long long int i = (long long int)(0); i < (long long int)(n); i++) {
    cin >> temp;
    pfs[i] = (getFactorization((temp)));
    for (auto &val : pfs[i]) {
      allpfs[val] += 1;
    }
  }
  string cond = "pairwise coprime";
  long long int cc = 0;
  for (long long int i = (long long int)(0); i < (long long int)(n); i++) {
    for (auto &val : pfs[i]) {
      if (allpfs[val] != 1) {
        cond = "setwise coprime";
      }
    }
  }
  if (cond == "setwise coprime") {
    for (long long int i = (long long int)(0); i < (long long int)(n); i++) {
      for (auto &val : pfs[i]) {
        if (allpfs[val] != n) {
          cc += 1;
          break;
        }
      }
    }
  }
  if (cond == "setwise coprime" and cc != n) {
    cond = "not coprime";
  }
  cout << cond << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
