#include <bits/stdc++.h>
int gdc(int x, int y) {
  int big = std::max(x, y);
  int small = std::min(x, y);
  if (big % small == 0) return small;
  return gdc(small, big % small);
}
int main() {
  int N;
  std::cin >> N;
  std::vector<int> nlist;
  std::vector<int> pcheck(200100, false);
  std::vector<int> ncheck(200100, false);
  pcheck.at(0) = true;
  pcheck.at(1) = true;
  int maxn = 0;
  for (int i = 0; i < N; i++) {
    int n;
    std::cin >> n;
    nlist.push_back(n);
    maxn = std::max(maxn, n);
    ncheck.at(n) = true;
  }
  bool ispc = true;
  for (int ch = 0; ch <= maxn; ch++) {
    int count = 0;
    if (pcheck.at(ch) == false) {
      int i = ch;
      while (i < maxn) {
        pcheck.at(i) = true;
        if (ncheck.at(i) == true) {
          count += 1;
        }
        i += ch;
      }
      if (count > 1) {
        ispc = false;
        break;
      }
    }
  }
  bool issc = false;
  int tgdc = nlist.at(0);
  for (int i = 1; i < N; i++) {
    tgdc = gdc(tgdc, nlist.at(i));
    if (tgdc == 1) {
      issc = true;
      break;
    }
  }
  if (ispc) {
    std::cout << "pairwise comprime" << std::endl;
  } else if (issc) {
    std::cout << "setwise comprime" << std::endl;
  } else {
    std::cout << "not coprime" << std::endl;
  }
}
