#include <bits/stdc++.h>
using namespace std;
int a[1000005], sum[1005];
int gcdd(int x, int y) {
  int z;
  while (y) {
    z = x;
    x = y;
    y = z % y;
  }
  return x;
}
int main() {
  int n, now, i;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  now = a[1];
  for (i = 2; i <= n; i++) {
    now = gcdd(now, a[i]);
  }
  if (now == 1) {
    int j;
    for (i = 1; i <= n; i++) {
      int x = a[i];
      for (j = 2; j <= sqrt(a[i]); j++) {
        int noww = 0;
        while (x % j == 0) {
          noww++;
          x /= j;
        }
        if (sum[j] && noww) {
          printf("setwise coprime");
          return 0;
        }
        sum[j] += noww;
      }
    }
  } else {
    printf("not coprime");
    return 0;
  }
  printf("pairwise coprime");
  return 0;
}
