#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const int INF = 0x3f3f3f3f;
const double EPS = 1e-10;
int inline in() {
  int x = 0, c;
  for (; (unsigned)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -in();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned)((c = getchar()) - '0') < 10);
  return x;
}
const int Maxv = 1e3 + 5;
bool is_prime[Maxv];
vector<int> prime;
void init() {
  for (int i = 0; i < Maxv; i++) is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i < Maxv; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      for (int j = 2 * i; j < Maxv; j += i) is_prime[j] = false;
    }
  }
}
int n;
const int Maxn = 1e6 + 5;
int a[Maxn];
int ok_cnt[Maxn];
int main() {
  init();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  bool ver1 = true;
  for (int i = 1; i <= n; i++) {
    int x = a[i];
    if (x == 1) {
      ok_cnt[1]++;
      continue;
    }
    ok_cnt[1]++;
    if (ok_cnt[x] > 0) {
      ver1 = false;
    }
    ok_cnt[x]++;
    for (int j = 0; j < ((int)(prime).size()); j++) {
      int pi = prime[j];
      if (pi * pi > x) break;
      if (x % pi == 0) {
        if (x / pi == pi) {
          if (ok_cnt[pi] > 0) ver1 = false;
          ok_cnt[pi]++;
        } else {
          if (ok_cnt[pi] > 0 || ok_cnt[x / pi] > 0) ver1 = false;
          ok_cnt[pi]++;
          ok_cnt[x / pi]++;
        }
      }
    }
  }
  for (int i = 2; i < Maxn; i++) {
    if (ok_cnt[i] == n) {
      printf("not coprime\n");
      return 0;
    }
  }
  if (ver1)
    printf("pairwise coprime\n");
  else
    printf("setwise coprime\n");
  return 0;
}
