#include <bits/stdc++.h>
using namespace std;
long long inv[6000001], pre[6000001];
int notprime[6000001], prime[1000002], tot;
int n, GCD, state;
int a[1000001], cnt[80000];
const long long mod = 998244353;
void getInv() {
  inv[1] = 1;
  pre[1] = 1;
  for (long long i = 2; i <= 6000000; i++) {
    inv[i] = (mod - mod / i) * inv[mod % i] % mod;
    pre[i] = (pre[i - 1] + (inv[i] * inv[i]) % mod) % mod;
  }
}
void prime_sieve(int N) {
  notprime[0] = 1;
  notprime[1] = 1;
  notprime[2] = 0;
  for (int i = 2; i <= N; i++) {
    if (!notprime[i]) prime[++tot] = i;
    for (int j = 1; j <= tot; j++) {
      if (i * prime[j] > N) break;
      notprime[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
void fenjie(int n) {
  int tmp = 1;
  while (n > 1) {
    if (n % prime[tmp] == 0) {
      cnt[tmp]++;
    }
    while (n % prime[tmp] == 0) n /= prime[tmp];
    tmp++;
  }
}
int gcd(int x, int y) {
  if (y == 0) return x;
  int z = x % y;
  while (z) {
    z = x % y;
    x = y;
    y = z;
  }
  return x;
}
int main() {
  prime_sieve(1000000);
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int tmp;
    scanf("%d", &tmp);
    fenjie(tmp);
    GCD = gcd(tmp, GCD);
  }
  for (int i = 1; i <= 80000; i++) {
    if (cnt[i] > 1) {
      state++;
      break;
    }
  }
  if (state == 0) {
    printf("pairwise coprime");
    return 0;
  }
  if (GCD == 1) {
    printf("setwise coprime");
    return 0;
  }
  printf("not coprime");
  return 0;
}
