#include <bits/stdc++.h>
inline int gcd(int a, int b) {
  if (b < a) std::swap(a, b);
  int r = a % b;
  if (r == 0) return b;
  while (r != 0) r = a % b, a = b, b = r;
  return a;
}
int cnt[1000001];
int main() {
  int n;
  scanf("%d", &n);
  if (n > 78498) {
    int g;
    scanf("%d", &g);
    for (int i = 1; i < n; i++) {
      int k;
      scanf("%d", &k);
      g = gcd(g, k);
    }
    if (g == 1)
      printf("setwise coprime\n");
    else
      printf("not coprime\n");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    int num;
    scanf("%d", &num);
    cnt[num]++;
  }
  int max_S = 0;
  for (int i = 2; i <= 1000000; i++) {
    int S = 0;
    for (int j = i; j <= 1000000; j += i) S += cnt[j];
    max_S = std::max(max_S, S);
  }
  if (max_S < 2)
    printf("pairwise coprime\n");
  else if (max_S != n)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
}
