#include <bits/stdc++.h>
const int MAXN = 1e6 + 10;
using namespace std;
int n, a[MAXN], Sum, sum[MAXN], flag;
int cnt, prime[MAXN];
bool vis[MAXN];
int gcd(int a, int b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
void init() {
  prime[++cnt] = 3;
  for (int i = 2; i <= 10000; i++) {
    if (!vis[i] && i % 2 != 0) {
      prime[++cnt] = i;
    }
    for (int j = 1; j <= cnt; j++) {
      if (i * prime[j] > MAXN - 10) break;
      vis[i * prime[j]] = 1;
    }
  }
}
int main() {
  init();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2 == 0) Sum++;
    if (Sum == 2) flag = 1;
  }
  if (flag) {
    int now = a[1];
    for (int i = 2; i <= n; i++) {
      now = gcd(now, a[i]);
    }
    if (now == 1)
      printf("setwise coprime");
    else
      printf("not coprime");
    return 0;
  }
  sort(a + 1, a + n + 1);
  if (n % 2 == 0) {
    for (int i = 1; i <= n; i += 2) {
      int now = gcd(a[i], a[i + 1]);
      if (now != 1) {
        flag = 1;
        break;
      }
    }
  } else {
    for (int i = 1; i <= n - 1; i += 2) {
      int now = gcd(a[i], a[i + 1]);
      if (now != 1) {
        flag = 1;
        break;
      }
    }
    if (gcd(a[n], a[n - 1]) != 1) {
      flag = 1;
    }
  }
  int flag2 = 0;
  for (int i = 1; i <= n; i++) {
    if (flag2) break;
    for (int j = 1; j <= cnt; j++) {
      if (a[i] < prime[j]) break;
      if (a[i] % prime[j] == 0) {
        sum[j]++;
      }
      if (sum[j] == 2) {
        flag2 = 1;
        break;
      }
    }
  }
  if (flag2) {
    printf("not coprime");
    return 0;
  }
  if (flag) {
    int now = a[1];
    for (int i = 2; i <= n; i++) {
      now = gcd(now, a[i]);
    }
    if (now == 1)
      printf("setwise coprime");
    else
      printf("not coprime");
  } else {
    printf("pairwise coprime");
  }
  return 0;
}
