#include <bits/stdc++.h>
using namespace std;
vector<bool> PN_chk(1000000 + 1, true);
vector<long long> PNs;
void eratosthenes() {
  long long MAXRR = sqrt(1000000) + 1;
  PN_chk[0] = false;
  PN_chk[1] = false;
  for (long long i = 2; i <= long long(MAXRR); i++) {
    if (PN_chk[i])
      for (long long j = i; j <= long long(long long(1000000 / i)); j++) {
        PN_chk[j * i] = false;
      }
  }
  for (long long i = 2; i <= long long(1000000); i++)
    if (PN_chk[i]) PNs.push_back(i);
}
int main() {
  int N, Ans = 0, tmp = 0;
  cin >> N;
  eratosthenes();
  vector<int> vec(N);
  for (long long i = 0; i < long long(N); i++) {
    cin >> vec.at(i);
  }
  sort(vec.begin(), vec.end());
  for (int i = 0; i <= sqrt(vec.at(N - 1)); i++) {
    tmp = 0;
    if (PNs.at(i) > sqrt(vec.at(N - 1))) {
      break;
    }
    for (long long j = 0; j < long long(N); j++) {
      if (vec.at(j) % PNs.at(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;
  }
}
