#include <bits/stdc++.h>
using namespace std;
const int N = 1e7 + 5;
int n;
int rc[N], totgcd, num[N];
int prime[N], vis[N], cnt = 0;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
inline void getprime() {
  memset(rc, 0, sizeof(rc));
  memset(vis, 0, sizeof(vis));
  for (int i = 2; i < N; ++i) {
    if (!vis[i]) {
      vis[i] = 1;
      prime[++cnt] = i;
    }
    for (int j = 1; j <= cnt && i * prime[j] < N; ++j) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
inline void div(int a) {
  int IsPrime = 1;
  for (int i = 1; i <= cnt && prime[i] <= sqrt(a); ++i) {
    int j = 0;
    while (!(a % prime[i])) {
      IsPrime = 0;
      a /= prime[i];
      if (!j) ++rc[prime[i]];
      ++j;
    }
  }
  if (IsPrime) ++rc[a];
}
int main() {
  getprime();
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &num[i]);
  }
  totgcd = num[1];
  for (int i = 2; i <= n; ++i) {
    totgcd = gcd(totgcd, num[i]);
  }
  if (totgcd != 1) {
    printf("not coprime\n");
    return 0;
  }
  for (int i = 1; i <= n; ++i) div(num[i]);
  for (int i = 1; i <= cnt; ++i)
    if (rc[prime[i]] > 1) {
      printf("setwise coprime\n");
      return 0;
    }
  printf("pairwise coprime\n");
  return 0;
}
