#include <bits/stdc++.h>
using namespace std;
constexpr long long R = 2e5 + 69, INF = 2e9 + 6969;
int n, A[R], D, M, lp[R];
vector<int> p;
set<int> s;
int NWD(int a, int b) {
  while (a > 0 && b > 0) {
    if (a > b)
      a %= b;
    else
      b %= a;
  }
  return a + b;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &A[i]);
    M = max(M, A[i]);
  }
  D = A[0];
  for (int i = 1; i < n; ++i) D = NWD(A[i], D);
  if (D > 1) {
    puts("not coprime");
    return 0;
  }
  for (int i = 2; i <= M; ++i) {
    if (lp[i] == 0) {
      lp[i] = i;
      p.push_back(i);
    }
    for (int j = 0; j < p.size() && i * p[j] <= M && p[j] <= lp[i]; ++j) {
      lp[i * p[j]] = p[j];
    }
  }
  bool ok = 1;
  for (int i = 0; i < n; ++i) {
    int x = A[i];
    int d = INF;
    while (x > 1) {
      if (d != lp[x]) {
        d = lp[x];
        if (s.count(d)) {
          ok = 0;
          break;
        }
        s.insert(d);
      }
      x /= lp[x];
    }
    if (!ok) break;
  }
  puts(ok ? "pairwise coprime" : "setwise coprime");
  return 0;
}
