#include <bits/stdc++.h>
using ll = long long;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  std::cin >> N;
  std::vector<int> A(N);
  for (int i = 0; i < (N); i++) std::cin >> A[i];
  bool pairwise = true;
  bool setwise = false;
  int tmp = gcd(A[N - 2], A[N - 1]);
  if (tmp != 1) pairwise = false;
  if (tmp == 1) setwise = true;
  for (int i = N - 3; i >= 0; i--) {
    tmp = gcd(A[i], tmp);
    if (tmp == 1) setwise = true;
    if (tmp != 1) pairwise = false;
  }
  if (pairwise) {
    std::cout << "pairwise coprime" << std::endl;
  } else if (setwise) {
    std::cout << "setwise coprime" << std::endl;
  } else {
    std::cout << "not coprime" << std::endl;
  }
  return 0;
}
