#include <bits/stdc++.h>
int main() {
  int N;
  std::cin >> N;
  long long* A = new long long[N];
  for (int i = 0; i < N; i++) std::cin >> A[i];
  bool x[1000000];
  for (int i = 0; i < 1000000; i++) x[i] = true;
  for (int i = 2; i < 1000000; i++) {
    if (!x[i]) continue;
    for (int d = 2 * i; d < 1000000; d += i) x[d] = false;
  }
  std::vector<int> p;
  for (int i = 2; i < 1000000; i++) {
    if (x[i]) p.push_back(i);
  }
  std::vector<int> cnt(p.size(), 0);
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < p.size(); j++) {
      if (A[i] % p[j] == 0) cnt[j]++;
    }
  }
  bool pwflg = true;
  bool swflg = true;
  for (int j = 0; j < cnt.size(); j++) {
    if (cnt[j] > 1) pwflg = false;
    if (cnt[j] == N) swflg = false;
    if (!pwflg || !swflg) break;
  }
  if (pwflg)
    std::cout << "pairwise coprime" << std::endl;
  else if (swflg)
    std::cout << "setwise coprime" << std::endl;
  else
    std::cout << "not coprime" << std::endl;
  delete[] A;
  return 0;
}
