#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma G++ optimize(2)
using namespace std;
const int MAX_N = 1e6 + 5;
inline int qi() {
  int f = 0, fu = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') fu = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    f = (f << 3) + (f << 1) + c - 48;
    c = getchar();
  }
  return f * fu;
}
bool is_prime[MAX_N];
int prime[MAX_N / 10], cntp = 0, mndiv[MAX_N];
void init() {
  for (register int i = 2; i <= MAX_N - 1; ++i) is_prime[i] = 1;
  mndiv[1] = 1;
  for (register int i = 2; i <= MAX_N - 1; ++i) {
    if (is_prime[i]) prime[++cntp] = i, mndiv[i] = i;
    for (int j = 1; j <= cntp && i * prime[j] < MAX_N; j++) {
      is_prime[i * prime[j]] = false, mndiv[i * prime[j]] = prime[j];
      if (i % prime[j] == 0) break;
    }
  }
}
int a[MAX_N], cnt[MAX_N];
int main() {
  init();
  memset(cnt, 0, sizeof(cnt));
  int n;
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) a[i] = qi();
  for (register int t = 1; t <= n; ++t) {
    int x = a[t];
    for (register int i = 1; i <= cntp; ++i) {
      if (1ll * prime[i] * prime[i] > x) break;
      if (x % prime[i] == 0) cnt[prime[i]]++;
      while (x % prime[i] == 0) x /= prime[i];
    }
    if (x > 1) cnt[x]++;
  }
  int mx = 0;
  for (register int i = 2; i <= MAX_N - 1; ++i) mx = max(mx, cnt[i]);
  if (mx == 1)
    puts("pairwise coprime");
  else if (mx < n)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
