#include <bits/stdc++.h>
using namespace std;
string res(int n) {
  if (n == 0)
    return "pairwise coprime";
  else if (n == 1)
    return "setwise coprime";
  else
    return "not coprime";
}
const int M = 1e6 + 5;
int64_t gcd(int64_t a, int64_t b) { return a % b ? gcd(b, a % b) : b; }
int64_t lcm(int64_t a, int64_t b) { return a / gcd(a, b) * b; }
int main() {
  int N;
  cin >> N;
  vector<int64_t> A(N);
  vector<int> B(M);
  for (auto &e : A) {
    cin >> e;
    B[e]++;
  }
  sort(A.begin(), A.end());
  int64_t G = 0;
  for (int i = 0; i < (N); ++i) G = gcd(G, A[i]);
  bool ng = false;
  for (int i = 2; i < M; ++i)
    if (B[i] > 1) ng = true;
  for (int i = 2; i * i <= M + 2; ++i) {
    int cnt = 0;
    for (int j = i; j < M; j += i) {
      cnt += B[j];
    }
    if (cnt > 1) ng = true;
  }
  if (G == 1) {
    if (ng)
      cout << res(1) << '\n';
    else
      cout << res(0) << '\n';
  } else {
    cout << res(2) << '\n';
  }
  cerr << G << '\n';
  return 0;
}
