#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
const int maxN = 100000;
int n, a[maxN + 10], have[maxN + 10];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int isn[maxN + 10], prime[maxN + 10], len, GCD;
bool vis[maxN + 10];
void init() {
  for (int i = 2; i <= maxN; i++) {
    if (!vis[i]) prime[++len] = i, isn[i] = i;
    for (int j = 1; j <= len; j++) {
      if (i * prime[j] > maxN) break;
      vis[i * prime[j]] = 1;
      isn[i * prime[j]] = prime[j];
      if (i % prime[j] == 0) {
        break;
      }
    }
  }
}
int main() {
  init();
  n = read();
  a[1] = read();
  GCD = a[1];
  for (int i = 2; i <= n; i++) a[i] = read(), GCD = gcd(GCD, a[i]);
  if (GCD != 1) return puts("not coprime"), 0;
  for (int i = 1; i <= n; i++) {
    int tmp = a[i];
    while (tmp > 1) {
      int h = isn[tmp];
      have[isn[tmp]]++;
      if (have[isn[tmp]] > 1) return puts("setwise coprime"), 0;
      while (isn[tmp] == h) tmp /= isn[tmp];
    }
  }
  puts("pairwise coprime");
  return 0;
}
