#include <bits/stdc++.h>
int n;
int a[1000000], cnt[1000001];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 2; i <= 1000; i++) {
    for (int j = 0; j < n; j++) {
      if (a[j] % i == 0) cnt[i]++;
      while (a[j] % i == 0) a[j] /= i;
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i] > 1000) cnt[a[i]]++;
  }
  int ans = 0;
  for (int i = 2; i <= 1000000; i++) {
    if (cnt[i] > 1) ans = 1;
    if (cnt[i] == n) {
      ans = 2;
      break;
    }
  }
  if (ans == 0) printf("pairwise coprime\n");
  if (ans == 1) printf("setwise coprime\n");
  if (ans == 2) printf("not coprime\n");
  return 0;
}
