#include <bits/stdc++.h>
using namespace std;
int main() {
  constexpr int A_MAX = 1000000;
  vector<int> min_factor(A_MAX + 1);
  vector<int> q(A_MAX + 1, 1);
  vector<int> primes;
  for (int i = 2; i <= A_MAX; ++i) {
    if (!min_factor[i]) {
      min_factor[i] = i;
      primes.push_back(i);
    }
    for (int p : primes) {
      int n = i * p;
      if (n > A_MAX) {
        break;
      }
      min_factor[n] = p;
      if (p == min_factor[i]) {
        q[n] = q[i];
        break;
      } else {
        q[n] = i;
      }
    }
  }
  int N = 0;
  char c = getchar_unlocked();
  do {
    N = 10 * N + c - '0';
  } while ((c = getchar_unlocked()) >= '0');
  vector<int> a(A_MAX + 1);
  for (int i = 0; i < N; ++i) {
    int A = 0;
    c = getchar_unlocked();
    do {
      A = 10 * A + c - '0';
    } while ((c = getchar_unlocked()) >= '0');
    ++a[A];
  }
  bool is_pairwise_coprime = true;
  for (int n = A_MAX; n >= 1; --n) {
    if (a[n] > 1) {
      if (a[n] == N) {
        printf("not coprime\n");
        return 0;
      }
      is_pairwise_coprime = false;
    }
    a[min_factor[n]] += a[n];
    a[q[n]] += a[n];
  }
  if (is_pairwise_coprime) {
    printf("pairwise coprime\n");
  } else {
    printf("setwise coprime\n");
  }
  return 0;
}
