#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
int v[MAXN], prime[MAXN], n, m, pr[MAXN], a[MAXN];
void primes(int x) {
  for (int i = 2; i <= x; i++) {
    if (v[i]) continue;
    prime[++m] = i;
    for (int j = i; j <= x / i; j++) v[i * j] = 1;
  }
}
void div(int x) {
  for (int i = 1; i <= m; i++) {
    if (x % prime[i] == 0) {
      pr[prime[i]] += 1;
      while (x % prime[i] != 0) x /= prime[i];
    }
    if (x == 1) break;
    if (prime[i] >= x) {
      pr[x] += 1;
      break;
    }
  }
}
int main() {
  primes(MAXN);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    div(a[i]);
  }
  int flag = 0;
  for (int i = 1; i <= 1e6; i++) {
    if (pr[MAXN] > 1) flag = 1;
    if (pr[MAXN] == n) {
      flag = 2;
      break;
    }
  }
  if (flag == 0)
    printf("pairwise coprime\n");
  else if (flag == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
