#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long infll = 1e18 + 9;
const int infint = 1e9 + 7;
const int MAXN = 1e6 + 7;
const double eps = 1e-9;
const long double pi = 3.1415926535897932384626433832795;
const long double e = 2.71828182845904523536028747135266;
inline long long read() {
  long long kr = 1, xs = 0;
  char ls;
  ls = getchar();
  while (!isdigit(ls)) {
    if (!(ls ^ 45)) kr = -1;
    ls = getchar();
  }
  while (isdigit(ls)) {
    xs = (xs << 1) + (xs << 3) + (ls ^ 48);
    ls = getchar();
  }
  return xs * kr;
}
inline unsigned long long readull() {
  unsigned long long xs = 0;
  char ls;
  ls = getchar();
  while (!isdigit(ls)) ls = getchar();
  while (isdigit(ls)) {
    xs = (xs << 1) + (xs << 3) + (ls ^ 48);
    ls = getchar();
  }
  return xs;
}
inline void writeull(unsigned long long x) {
  if (x < 0) {
    x *= -1;
    putchar('-');
  }
  if (x >= 10) writeull(x / 10);
  putchar('0' + x % 10);
}
inline void write(long long x) {
  if (x < 0) {
    x *= -1;
    putchar('-');
  }
  if (x >= 10) write(x / 10);
  putchar('0' + x % 10);
}
int pri[MAXN], cnt, vis[MAXN], a[MAXN], n;
int gcd(int a, int b) { return b > 0 ? gcd(b, a % b) : a; }
void getp(int nn) {
  for (int i = 2; i <= nn; i++) {
    if (!vis[i]) pri[cnt++] = i;
    for (int j = 0; j < cnt; j++) {
      if (1ll * i * pri[j] > nn) break;
      vis[i * pri[j]] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
unordered_map<int, int> q;
int check() {
  q.clear();
  for (int i = 1; i <= n; i++) {
    int x = a[i];
    if (!vis[a[i]]) {
      if (q[a[i]]) return 0;
      q[a[i]] = 1;
      continue;
    }
    for (int j = 0; j < cnt && pri[j] <= x; j++) {
      if (x % pri[j] == 0) {
        if (q[pri[j]]) return 0;
        q[pri[j]] = 1;
      }
      while (x % pri[j] == 0) x /= pri[j];
    }
    if (x > 1) {
      if (q[x]) return 0;
      q[x] = 1;
    }
  }
  return 1;
}
int check1() {
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = gcd(ans, a[i]);
  if (ans == 1)
    return 1;
  else
    return 0;
}
int main() {
  int t = 1;
  while (t--) {
    getp(1000000);
    n = read();
    for (int i = 1; i <= n; i++) {
      a[i] = read();
    }
    if (check())
      printf("pairwise coprime\n");
    else if (check1())
      printf("setwise coprime\n");
    else
      printf("not coprime\n");
  }
  return 0;
}
