#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<bool> primes_vec(1000000 + 1, true);
  long long div = 2;
  while (div * div <= 1000000) {
    for (long long cnt = div * 2; cnt <= 1000000; cnt += div) {
      primes_vec[cnt] = false;
    }
    div++;
    for (; !primes_vec[div]; div++) {
    }
  }
  unordered_set<long long> primes;
  vector<bool> factormax(1000000 - 1, false);
  vector<bool> factormin(1000000 - 1, false);
  for (long long i = 2; i <= 1000000; i++) {
    if (primes_vec[i]) {
      primes.insert(i);
      factormax[i] = false;
      factormin[i] = true;
    }
  }
  long long n;
  cin >> n;
  bool flgpw = true;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    for (auto p : primes) {
      if (a % p == 0) {
        if (factormax[p]) flgpw = false;
        factormax[p] = true;
      } else {
        factormin[p] = false;
      }
    }
  }
  bool flgst = true;
  for (long long i = 2; i < 1000000; i++) {
    if (factormin[i]) flgst = false;
  }
  if (flgpw) {
    cout << "pairwise coprime";
  } else if (flgst) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
