#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int 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;
}
int n, maxn;
int a[1000010];
int Max(int x, int y) {
  if (x > y) return x;
  return y;
}
int gcd(int x, int y) { return (!y ? x : gcd(y, x % y)); }
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read(), maxn = Max(maxn, a[i]);
  bool flag = true;
  for (int i = 2; i * i <= maxn; i++) {
    int cnt = 0;
    for (int j = 1; j <= n; j++) {
      if (a[j] % i == 0) cnt++;
      if (cnt == 2) break;
    }
    if (cnt == 2) {
      flag = false;
      break;
    }
  }
  if (flag) {
    puts("pairwise coprime");
    return 0;
  }
  int g = a[1];
  for (int i = 2; i <= n; i++) g = gcd(g, a[i]);
  puts(g == 1 ? "setwise coprime" : "not coprime");
  return 0;
}
