#include <bits/stdc++.h>
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int N, A[1 << 20], B[1 << 18], t;
bool flg = true;
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", A + i);
    if (!i)
      t = A[i];
    else {
      t = gcd(t, A[i]);
    }
    if (flg) {
      for (int j = 2; j * j <= A[i]; j++) {
        if (A[i] % j == 0) {
          while (A[i] % j == 0) A[i] /= j;
          B[j]++;
          if (B[j] > 1) {
            flg = false;
            break;
          }
        }
      }
      B[A[i]]++;
      if (B[A[i]] > 1) flg = false;
    }
  }
  if (flg) {
    puts("pairwise coprime");
  } else if (t == 1) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
