#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, MAX = 1e6;
int n, maxn;
int a[N], f[N], ss[N];
vector<int> ssb;
void init() {
  cin >> n;
  for (int i = 2; i <= MAX; i++) ss[i] = 1;
  for (int i = 2; i <= MAX; i++) {
    if (ss[i]) {
      ssb.push_back(i);
      for (int j = i * 2; j <= MAX; j += i) {
        ss[j] = 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    maxn = max(maxn, a[i]);
  }
}
int main() {
  init();
  for (int i = 1; i <= n; i++) {
    if (ss[a[i]]) {
      f[a[i]]++;
      continue;
    }
    int j = 0;
    while (ssb[j] <= sqrt(a[i] * 1.0)) {
      if (a[i] % ssb[j] == 0) {
        int s1 = a[i] / ssb[j];
        if (ss[s1] && s1 != ssb[j]) f[s1]++;
        f[ssb[j]]++;
      }
      j++;
    }
  }
  int flag1 = 1, flag2 = 1;
  for (int i = 2; i <= maxn; i++) {
    if (f[i] >= 2) flag1 = 0;
    if (f[i] >= n) flag2 = 0;
  }
  if (flag1)
    printf("pairwise coprime\n");
  else if (flag2)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
