#include <bits/stdc++.h>
using namespace std;
vector<long long> PN_chk(100000 + 1, 1);
map<long long, long long> prime;
void se() {
  long long MAXRR = sqrt(100000) + 1;
  PN_chk[0] = 0;
  PN_chk[1] = 0;
  for (long long i = 2; i <= long long(MAXRR); i++) {
    if (PN_chk[i] == 1)
      for (long long j = i; j <= long long(long long(100000 / i)); j++) {
        PN_chk[j * i] = i;
      }
  }
}
void prime_factorize(long long n) {
  if (n <= 1) return;
  if (PN_chk[n] == 1) {
    prime[n] += 1;
    return;
  }
  prime[PN_chk[n]] += 1;
  prime_factorize(long long(n / PN_chk[n]));
}
int main() {
  int N, Ans = 0, tmp = 0;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < (int)(N); i++) {
    cin >> vec.at(i);
  }
  sort(vec.begin(), vec.end());
  prime_factorize(100000);
  for (int i = 2; i <= sqrt(vec.at(0)); i++) {
    tmp = 0;
    if (PN_chk[i]) {
      for (int j = 0; j < (int)(N); j++) {
        if (vec.at(j) % i == 0) tmp++;
      }
    }
    Ans = max(Ans, tmp);
    if (Ans == N) {
      break;
    }
  }
  if (Ans == N) {
    cout << "not coprime" << endl;
  } else if (Ans >= 2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
}
