#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
const int MAXN = 1000005;
int a[MAXN];
int p[MAXN] = {};
set<int> fac;
bool notprime[MAXN];
bool gg = false;
void init() {
  memset(notprime, false, sizeof(notprime));
  notprime[0] = notprime[1] = true;
  for (int i = 2; i < MAXN; i++) {
    if (!notprime[i]) {
      int cnt = 0;
      if (p[i]) cnt++;
      if (i > MAXN / i) continue;
      for (int j = i * i; j < MAXN; j += i) {
        notprime[j] = true;
        if (p[j]) cnt++;
        if (cnt >= 2) {
          gg = true;
          return;
        }
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  int gcda = 0;
  init();
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
    if (gcda == 0)
      gcda = a[i];
    else
      gcda = gcd(gcda, a[i]);
    if (p[a[i]] && a[i] != 1) {
      gg = true;
    }
    p[a[i]] = true;
  }
  if (!gg) init();
  if (!gg) {
    cout << "pairwise coprime";
  } else if (gcda == 1) {
    cout << "setwise coprime";
  } else
    cout << "not coprime";
}
