#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return s * w;
}
int n, a[3333333], ans;
map<int, int> xcj;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
const int MAXN = 3333333;
int cnt, p[MAXN], v[MAXN];
void prime(int maxn) {
  for (int i = 2; i <= maxn; i++) {
    if (v[i] == 0) {
      v[i] = i;
      p[++cnt] = i;
    }
    for (int j = 1; j <= cnt; j++) {
      if (p[j] > v[i] || p[j] > maxn / i) break;
      v[p[j] * i] = p[j];
    }
  }
}
int main() {
  n = read();
  int maxn = -1;
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    maxn = max(maxn, a[i]);
  }
  prime(maxn);
  for (int i = 1; i <= n; i++) {
    int x = a[i];
    for (int j = 1; p[j] <= x; j++) {
      if (x % p[j] == 0) xcj[p[j]]++;
      while (x % p[j] == 0) x /= p[j];
    }
  }
  for (int i = 1; i <= cnt; i++) {
    if (xcj[i] >= 2) ans = 1;
    if (xcj[i] >= n) {
      ans = 2;
      break;
    }
  }
  if (ans == 0) {
    puts("pairwise coprime");
  } else if (ans == 1) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
