#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
int prime[maxn];
int n;
int isprime[maxn];
int a[maxn];
int vis[maxn];
int main() {
  int n;
  scanf("%d", &n);
  int cnt = 0;
  memset(isprime, 1, sizeof(isprime));
  isprime[0] = isprime[1] = 0;
  for (int i = 2; i <= maxn; i++) {
    if (isprime[i]) prime[++cnt] = i;
    for (int j = 1; j <= cnt && prime[j] * i <= maxn; j++) {
      isprime[prime[j] * i] = 0;
      if (i % prime[j] == 0) break;
    }
  }
  int type = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (isprime[a[i]]) {
      int j = a[i];
      vis[j]++;
      if (vis[j] >= 2) type = 1;
      if (vis[j] >= n) {
        type = 2;
        break;
      }
      continue;
    }
    for (int j = 2; j * j <= a[i]; j++) {
      if (isprime[j] == 0) continue;
      if (a[i] % j == 0) {
        vis[j]++;
        if (vis[j] >= 2) type = 1;
        if (vis[j] >= n) {
          type = 2;
          break;
        }
        int t = a[i] / j;
        if (isprime[t] && t != j) {
          vis[t]++;
          if (vis[t] >= 2) type = 1;
          if (vis[t] >= n) {
            type = 2;
            break;
          }
        }
      }
    }
    if (type == 2) break;
  }
  if (type == 2)
    printf("not coprime");
  else if (type == 1)
    printf("setwise coprime");
  else
    printf("pairwise coprime");
}
