#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000010;
int a[maxn], n, tot[maxn];
int prime[maxn], notprime[maxn];
int prime_tot;
int gcd(int x, int y) { return (!y) ? x : gcd(y, x % y); }
void linear_seive() {
  notprime[1] = 1;
  for (int i = 2; i <= 1000000; ++i) {
    if (!notprime[i]) {
      prime[++prime_tot] = i;
    }
    for (int j = 1; j <= prime_tot && i * prime[j] <= 1000000; ++j) {
      notprime[i * prime[j]] = 1;
      if (!(i % prime[j])) {
        break;
      }
    }
  }
}
int main() {
  linear_seive();
  scanf("%d", &n);
  bool ok = true;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; ++i) {
    int tmp = 1, s = a[i];
    while (s != 1) {
      if (s % prime[tmp] == 0) {
        ++tot[prime[tmp]];
        if (tot[prime[tmp]] > 1) ok = false;
        while (s % prime[tmp] == 0) s /= prime[tmp];
      }
      ++tmp;
    }
  }
  int gd = a[1];
  for (int i = 2; i <= n; ++i) {
    gd = gcd(gd, a[i]);
    if (gd == 1) break;
  }
  if (ok)
    printf("pairwise coprime");
  else if (gd == 1)
    printf("setwise coprime");
  else
    printf("not coprime");
}
