#include <bits/stdc++.h>
const int MAX_N = 1000005;
int N;
int prime_arr[MAX_N];
int prime_cts2[MAX_N];
int prime_cts[MAX_N];
int vals[MAX_N];
std::vector<int> primes[MAX_N];
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) {
    int v;
    scanf("%d", &v);
    vals[v]++;
  }
  for (int64_t i = 2; i < MAX_N; ++i) {
    if (prime_arr[i]) continue;
    primes[i].push_back(i);
    for (int64_t j = i * i; j < MAX_N; j += i) {
      if (prime_arr[j] == 0) primes[j].push_back(i);
      prime_arr[j] = true;
    }
  }
  bool pairwise = true;
  bool setwise = true;
  for (int i = 0; i < MAX_N; ++i) {
    for (int k = 0; k < vals[i]; ++k) {
      int v = i;
      while (v > 1) {
        int z = v;
        for (int p : primes[z]) {
          bool had_prime = false;
          while (v % p == 0) {
            v /= p;
            pairwise = !prime_cts[p];
            had_prime = true;
          }
          if (had_prime) {
            prime_cts[p] = 1;
            prime_cts2[p] += 1;
            if (prime_cts2[p] == N) setwise = false;
          }
        }
      }
    }
  }
  if (pairwise)
    printf("pairwise coprime\n");
  else if (setwise)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
}
