#include <bits/stdc++.h>
template <typename T>
inline T read() {
  T x = 0;
  char ch = std::getchar();
  bool f = 0;
  while (!std::isdigit(ch)) {
    f = (ch == '-');
    ch = std::getchar();
  }
  while (std::isdigit(ch)) {
    x = x * 10 + (ch - '0');
    ch = std::getchar();
  }
  return f ? -x : x;
}
template <typename T>
void put(T x) {
  if (x < 0) {
    x = -x;
    std::putchar('-');
  }
  if (x < 10) {
    std::putchar(x + 48);
    return;
  }
  put(x / 10);
  std::putchar(x % 10 + 48);
  return;
}
const int N = 1.1e6;
int a[N], p[N];
bool flag[N];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
bool is_prime(int x) {
  for (int i = 2; i <= sqrt(x); ++i)
    if (x % i == 0) return false;
  return true;
}
void fake_main() {
  int n = read<int>();
  int maxa = 1;
  for (int i = 1; i <= n; ++i) {
    a[i] = read<int>();
    maxa = std::max(a[i], maxa);
  }
  int r = 0;
  for (int i = 1; i <= n; ++i) r = gcd(a[i], r);
  if (r != 1) {
    printf("not coprime\n");
    return;
  }
  int cnt = 0;
  for (int i = 2; i <= maxa; ++i)
    if (is_prime(i)) p[++cnt] = i;
  for (int i = 1; i <= n; ++i) {
    int j = 1;
    while (a[i] != 1) {
      bool sign = false;
      while (a[i] != 1 && a[i] % p[j] == 0) {
        if (flag[p[j]]) {
          printf("setwise coprime\n");
          return;
        }
        a[i] /= p[j];
        sign = true;
      }
      if (sign) flag[p[j]] = true;
      ++j;
    }
  }
  printf("pairwise coprime\n");
}
int main() {
  fake_main();
  return 0;
}
