#include <bits/stdc++.h>
using namespace std;
bool IsPrime(int64_t num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int64_t i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  string result;
  bool once = true, all = true;
  int64_t N;
  cin >> N;
  vector<int64_t> a(N);
  for (int64_t i = 0; i < N; i++) {
    cin >> a[i];
  }
  queue<int64_t> once_prime, all_prime;
  vector<int64_t> prime(0);
  for (int i = 0; i < 1000000; i++) {
    if (IsPrime(i)) {
      prime.push_back(i);
    }
  }
  for (int64_t i = 0; i < prime.size(); i++) {
    int64_t count = 0;
    for (int64_t j = 0; j < N; j++) {
      if (a[j] % prime[i] == 0) count++;
    }
    if (count > 1) {
      all = false;
      break;
    }
  }
  for (int64_t i = 0; i < prime.size(); i++) {
    int64_t count = 0;
    for (int64_t j = 0; j < N; j++) {
      if (a[j] % prime[i] != 0) {
        j = N;
      } else
        count++;
    }
    if (count == N) {
      once = false;
      break;
    }
  }
  if (all) {
    cout << "pairwise coprime" << endl;
  } else if (once) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
