#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int isprime[maxn], prime[maxn], numprime, num[maxn], vis[maxn];
int n, a[maxn];
void makeprime(int up_bound) {
  isprime[0] = isprime[1] = 1;
  for (int i = 2; i < up_bound; i++) {
    if (!isprime[i]) prime[numprime++] = i;
    for (int j = 0; j < numprime && i * prime[j] < up_bound; j++) {
      isprime[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int primefac(int x) {
  if (x <= 1) return 0;
  int cur = 0;
  while (x > 1 && cur < numprime) {
    if (!isprime[x]) {
      vis[x]++;
      if (vis[x] > 1)
        return 1;
      else
        return 0;
    }
    if (x % prime[cur] == 0) {
      vis[prime[cur]]++;
      if (vis[prime[cur]] > 1) {
        return 1;
      }
      while (x > 1 && x % prime[cur] == 0) x /= prime[cur];
    }
    cur++;
  }
  return 0;
}
int main() {
  makeprime(maxn);
  scanf("%d", &n);
  int noflag = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    num[a[i]]++;
    if (a[i] != 1 && num[a[i]] > 1) noflag = 1;
  }
  if (noflag) {
    printf("not coprime\n");
    return 0;
  }
  if ((n - num[1] + 1) > 78499) {
    int g = a[1];
    for (int i = 2; i <= n; i++) g = gcd(g, a[i]);
    if (g == 1)
      printf("setwise coprime\n");
    else
      printf("not coprime\n");
    return 0;
  }
  noflag = 0;
  int g = a[1];
  primefac(a[1]);
  for (int i = 2; i <= n; i++) {
    g = gcd(g, a[i]);
    int u = primefac(a[i]);
    if (u) noflag = 1;
  }
  if (!noflag) {
    printf("pairwise coprime\n");
  } else {
    if (g == 1)
      printf("setwise coprime\n");
    else
      printf("not coprime\n");
  }
  return 0;
}
