#include <bits/stdc++.h>
using namespace std;
int scanint() {
  char c = getchar_unlocked();
  int x = 0;
  for (; (c < 48) || (c > 57); c = getchar_unlocked())
    ;
  for (; (c > 47) && (c < 58); c = getchar_unlocked()) x = 10 * x + c - 48;
  return x;
}
int min_factor[1000000 + 1];
int q[1000000 + 1];
int a[1000000 + 1];
int main() {
  vector<int> primes;
  for (int i = 2; i <= 1000000; ++i) {
    if (!min_factor[i]) {
      min_factor[i] = i;
      primes.push_back(i);
    }
    for (int p : primes) {
      int n = i * p;
      if (n > 1000000) {
        break;
      }
      min_factor[n] = p;
      if (p == min_factor[i]) {
        q[n] = q[i];
        break;
      } else {
        q[n] = i;
      }
    }
  }
  int N = scanint();
  for (int i = 0; i < N; ++i) {
    ++a[scanint()];
  }
  bool is_pairwise_coprime = true;
  for (int n = 1000000; n > 1; --n) {
    int an = a[n];
    if (an) {
      if (an > 1) {
        if (an > N) {
          printf("not coprime\n");
          return 0;
        }
        is_pairwise_coprime = false;
      }
      a[min_factor[n]] += an;
      a[q[n]] += an;
    }
  }
  if (is_pairwise_coprime) {
    printf("pairwise coprime\n");
  } else {
    printf("setwise coprime\n");
  }
  return 0;
}
