#include <bits/stdc++.h>
int main() {
  int N;
  std::cin >> N;
  std::vector<int> A(N);
  for (int i = 0; i < N; i++) {
    std::cin >> A[i];
  }
  std::vector<bool> PM(1e3 + 1, true);
  std::vector<int> PM_list;
  for (int i = 2; i <= 1e3; i++) {
    if (PM[i]) {
      PM_list.push_back(i);
      for (int j = i + i; j <= 1e3; j += i) {
        PM[j] = false;
      }
    }
  }
  std::vector<int> PM_cnt(PM_list.size(), 0);
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < PM_list.size(); j++) {
      if (A[i] % PM_list[j] == 0) {
        PM_cnt[j]++;
      }
    }
  }
  int f = 2;
  for (int j = 0; j < PM_list.size(); j++) {
    if (PM_cnt[j] == N) {
      f = 0;
    } else if (PM_cnt[j] > 1) {
      f = 1;
    }
  }
  if (f == 2) {
    std::cout << "pairwise coprime" << std::endl;
  } else if (f == 1) {
    std::cout << "setwise coprime" << std::endl;
  } else {
    std::cout << "not coprime" << std::endl;
  }
  return 0;
}
