#include <bits/stdc++.h>
long long gcd(long long a, long long b) {
  if (b == 0) return llabs(a);
  return gcd(b, a % b);
}
int a[1010101];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); i++) scanf("%d", &a[i]);
  int ggg = a[0];
  for (int i = 0; i < (int)(n - 1); i++) ggg = gcd(ggg, a[i + 1]);
  if (ggg != 1) {
    puts("not coprime");
    return 0;
  }
  const int P_MAX = 1000005;
  int pmn[P_MAX];
  for (int i = 1; i < P_MAX; i++)
    if (i % 2 == 0)
      pmn[i] = 2;
    else
      pmn[i] = i;
  for (int i = 3; i * i < P_MAX; i += 2) {
    if (pmn[i] == i) {
      for (int j = i * i; j < P_MAX; j += 2 * i)
        if (pmn[j] == j) pmn[j] = i;
    }
  }
  int cnt[P_MAX] = {0};
  for (int i = 0; i < (int)(n); i++) {
    while (a[i] != 1) {
      int apmn = pmn[a[i]];
      if (cnt[apmn]) {
        puts("setwise coprime");
        return 0;
      }
      cnt[apmn]++;
      while (a[i] % apmn == 0) a[i] /= apmn;
    }
  }
  puts("pairwise coprime");
}
