#include <bits/stdc++.h>
using namespace std;
long long T, n, m, i, j, k, x, y, z, Ans, sum, cnt;
long long a[1000010], b[1000010], p[1000010], v[1000010];
char c[1000010];
struct Data {
  long long x, y;
} d[1000010];
inline long long Abs(long long x) { return (x < 0) ? -x : x; }
inline void Swap(long long &a, long long &b) { a ^= b ^= a ^= b; }
inline long long Min(long long a, long long b) { return (a < b) ? a : b; }
inline long long Max(long long a, long long b) { return (a > b) ? a : b; }
inline bool cmp(const Data a, const Data b) { return a.x < b.x; }
inline long long Mi(long long x, long long y) {
  long long p = x, t = 1, Res = 1;
  for (; t <= y; (t & y) ? Res = (Res * p) % 998244353 : 0,
                           p = (p * p) % 998244353, t <<= 1)
    ;
  return Res;
}
inline long long read() {
  long long p = 0, f = 1;
  char c = getchar();
  while (c < 48 || c > 57) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= 48 && c <= 57) p = (p << 1) + (p << 3) + c - 48, c = getchar();
  return p * f;
}
inline int Gcd(int x, int y) { return (y == 0) ? x : Gcd(y, x % y); }
int main() {
  n = read();
  for (i = 1; i <= n; i++) a[i] = read();
  a[0] = a[1];
  for (i = 1; i <= n; i++) a[0] = Gcd(a[0], a[i]);
  if (a[0] != 1) {
    puts("not coprime");
    return 0;
  }
  for (i = 2; i <= 1000000; i++) {
    if (v[i]) continue;
    ++cnt;
    p[cnt] = i;
    v[i] = i;
    for (j = i * i; j <= 1000000; j++)
      if (!v[j]) v[j] = i;
  }
  for (i = 1; i <= n; i++) {
    x = a[i];
    while (v[x] > 1) {
      if (b[v[x]] && b[v[x]] != i) goto END;
      b[v[x]] = i;
      x /= v[x];
    }
  }
  puts("pairwise coprime");
  return 0;
END:;
  puts("setwise coprime");
  return 0;
}
