#include <bits/stdc++.h>
using namespace std;
void yesno(bool state);
map<long long, long long> countY;
void yakusu_count(long long i) {
  for (long long j = 1; j * j <= i; ++j) {
    if (i % j == 0) {
      countY[j]++;
      if (i / j != j) countY[i / j]++;
    }
  }
}
void Main() {
  long long N;
  cin >> N;
  std::vector<long long> A(N);
  for (long long i = 0; i < (long long)(N); i++) cin >> A[i];
  sort(A.begin(), A.end());
  for (long long j = 1; j * j <= A[N - 1]; ++j) {
    for (long long i = N - 1; i >= 0; i--) {
      if (j * j > A[i]) break;
      if (A[i] % j == 0) {
        countY[j]++;
        if (A[i] / j != j) countY[A[i] / j]++;
      }
    }
  }
  bool pairwise = true;
  for (auto i : countY)
    if (i.first != 1 && i.second > 1) pairwise = false;
  bool setwise = true;
  for (auto i : countY)
    if (i.first != 1 && i.second == N) setwise = false;
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else if (setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
int main(int argc, char const *argv[]) {
  Main();
  return 0;
}
void yesno(bool state) {
  if (state)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
