#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 5, N = 1e5 + 5, mod = 1e9 + 7, M = 1e5 + 5;
int d[N + 5];
int pairwise[N], a[N];
int main() {
  for (int i = 2; i <= N; i++) {
    if (d[i] > 0) continue;
    d[i] = i;
    if (i * 1ll * i <= N) {
      for (int j = i * i; j <= N; j += i) {
        if (d[j] > 0) continue;
        d[j] = i;
      }
    }
  }
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    int x = a[i];
    int was[N] = {0};
    while (x > 1) {
      if (!was[d[x]]) {
        pairwise[d[x]]++;
        was[d[x]] = 1;
      }
      x /= d[x];
    }
    if (x > 1 && !was) pairwise[x]++;
  }
  bool q1 = true, q2 = true;
  for (int i = 1; i <= N; i++) {
    if (pairwise[i] > 1) q1 = false;
    if (pairwise[i] == n) q2 = false;
  }
  if (q1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (q2) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
