#include <bits/stdc++.h>
using namespace std;
int n, a[1000005], cnt[1000005];
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (register int i = 1; i <= n; i++)
    for (register int j = 1; j * j <= a[i]; j++)
      if (a[i] % j == 0) {
        int num1 = j, num2 = a[i] / j;
        cnt[num1]++, cnt[num2]++;
        if (num1 == num2) cnt[num1]--;
      }
  bool f = true;
  for (register int i = 2; i <= 1000000; i++) {
    if (cnt[i] == n) {
      printf("not coprime\n");
      return 0;
    }
    f &= (cnt[i] == 1 || cnt[i] == 0);
  }
  if (f)
    printf("pairwise coprime\n");
  else
    printf("setwise coprime\n");
  return 0;
}
