#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char ch = getchar();
  long long x = 0;
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return x;
}
long long n, cnt;
long long a[2000010];
bool isnp[2000010];
long long p[2000010];
void init() {
  isnp[0] = isnp[1] = true;
  for (long long i = 2; i <= 2e6; i++) {
    if (!isnp[i]) p[++cnt] = i;
    for (long long j = 1; j <= cnt && i * p[j] <= 2e6; j++) {
      isnp[i * p[j]] = true;
      if (i % p[j] == 0) break;
    }
  }
}
long long gcd(long long x, long long y) { return (!y ? x : gcd(y, x % y)); }
int main() {
  init();
  n = read();
  for (long long i = 1; i <= n; i++) a[i] = read();
  bool flag = true;
  for (long long i = 1; i <= cnt && p[i] * p[i] <= 1e7; i++) {
    long long tot = 0;
    for (long long j = 1; j <= n; j++) {
      if (a[j] % p[i] == 0) tot++;
      if (tot >= 2) break;
    }
    if (tot >= 2) {
      flag = false;
      break;
    }
  }
  if (flag) {
    puts("pairwise coprime");
    return 0;
  }
  long long g = a[1];
  for (long long i = 2; i <= n; i++) g = gcd(g, a[i]);
  puts(g == 1 ? "setwise coprime" : "not coprime");
  return 0;
}
