#include <bits/stdc++.h>
using namespace std;
int n;
long long Fgcd[1000005];
long long a[1000005];
long long mul[1000005];
long long Flcm[1000005];
long long gcd(long long x, long long y) {
  if (x < y) {
    swap(x, y);
  }
  if (x % y == 0) {
    return y;
  }
  return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  bool f1 = 0, f2 = 0;
  Fgcd[1] = Flcm[1] = a[1];
  for (int i = 2; i <= n; i++) {
    Fgcd[i] = gcd(Fgcd[i - 1], a[i]);
    Flcm[i] = lcm(Flcm[i - 1], a[i]);
  }
  mul[1] = a[1];
  for (int i = 2; i <= n; i++) {
    mul[i] = mul[i - 1] * a[i];
  }
  if (Flcm[n] == mul[n]) {
    f1 = 1;
  }
  if (Fgcd[n] == 1) {
    f2 = 1;
  }
  if (f1) {
    printf("pairwise coprime");
  } else if (f2) {
    printf("setwise coprime");
  } else {
    printf("not coprime");
  }
  return 0;
}
