#include <bits/stdc++.h>
using namespace std;
long long read() {
  int x = 0;
  int f = 0;
  char c = getchar();
  while (c < '0' || c > '9') f |= c == '-', c = getchar();
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c - '0'), c = getchar();
  return f ? -x : x;
}
int n, a[1000006];
int pri[10000], _p, cnt[10000];
bool vis[10000];
void get_prime() {
  vis[1] = 1;
  for (int i = 2; i <= 10000; ++i) {
    if (!vis[i]) pri[++_p] = i;
    for (int j = 1; j <= _p && i * pri[j] <= n; ++i) {
      vis[i * pri[j]] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
void check(int k) {
  for (int i = 1; i <= _p; ++i)
    if (k % pri[i] == 0) {
      cnt[i]++;
      while (k % pri[i] == 0) k /= pri[i];
    }
}
int main() {
  n = read();
  get_prime();
  for (int i = 1; i <= n; ++i) a[i] = read();
  for (int i = 1; i <= n; ++i) check(a[i]);
  bool c = 0, b = 0;
  for (int i = 1; i <= _p; ++i) {
    if (cnt[i] > 1 && cnt[i] < n)
      b = 1;
    else if (cnt[i] == n)
      c = 1;
  }
  if (c)
    printf("not coprime\n");
  else if (!b)
    printf("pairwise coprime\n");
  else
    printf("setwise coprime\n");
  return 0;
}
