#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve(long long N, std::vector<long long> A) {
  sort(A.begin(), A.end());
  A.erase(std::unique(A.begin(), A.end()), A.end());
  int pairwise = 1;
  if (A.size() != N) {
    int pairwise = 0;
    N = A.size();
  }
  int i = 0;
  int tmp = A[i];
  int setwise = 0;
  for (int i = 1; i < N; i++) {
    tmp = gcd(tmp, A[i]);
    if (tmp == 1) {
      setwise = 1;
      break;
    }
  }
  if (setwise == 0) {
    pairwise = 0;
  }
  for (int i = 0; pairwise && i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A[i], A[j]) != 1) {
        pairwise = 0;
        break;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
