#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
long long lowbit(long long x) { return x & (-x); }
long long prime(long long x) {
  if (x <= 1) return false;
  for (int i = 2; i <= int(sqrt(x)); i++) {
    if (x % i == 0) return false;
  }
  return true;
}
bool cmp(long long a, long long b) { return a > b; }
long long gcd(long long a, long long b) {
  long long r;
  while (b > 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
inline int readint() {
  char c = getchar();
  int w = 1;
  int x = 0;
  while (!isdigit(c)) (c == '-') && (w = -w), c = getchar();
  while (isdigit(c)) x = (x << 3) + (x << 1) + (c ^ '0'), c = getchar();
  x *= w;
  return x;
}
inline long long readll() {
  char c = getchar();
  long long w = 1;
  long long x = 0;
  while (!isdigit(c)) (c == '-') && (w = -w), c = getchar();
  while (isdigit(c)) x = (x << 3) + (x << 1) + (c ^ '0'), c = getchar();
  x *= w;
  return x;
}
void fl(string name) {
  freopen((name + ".in").c_str(), "r", stdin);
  freopen((name + ".out").c_str(), "w", stdout);
}
const int dx[8] = {-1, 1, 0, 0, -1, 1, -1, 1},
          dy[8] = {0, 0, -1, 1, -1, -1, 1, 1};
long long n, m, p, tree[200010];
long long a[1000100], f[1000100];
int main() {
  cin >> n;
  long long g;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    f[a[i]] = 1;
    if (i == 1)
      g = a[i];
    else
      g = gcd(a[i], g);
  }
  if (g > 1) {
    cout << "not coprime" << '\n';
    return 0;
  }
  for (int i = 2; i <= 1000000; i++) {
    long long flag = 0;
    for (int j = i + i; j <= 1000000; j += i) {
      if (f[j]) flag++;
    }
    if (flag >= 2) {
      cout << "setwise coprime" << '\n';
      return 0;
    }
  }
  cout << "pairwise coprime" << '\n';
  return 0;
}
