#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long num[N] = {0};
int main() {
  long long n, x, pc = 0, sc = 0, ok = 0, cnt = 0;
  scanf("%lld", &n);
  for (long long j = 1; j <= n; j++) {
    scanf("%lld", &x);
    for (long long i = 2; i * i <= x; i++) {
      if (x % i == 0) num[i]++;
      while (x % i == 0) {
        x /= i;
      }
    }
    if (x > 1) num[x]++;
  }
  for (long long i = 1; i <= n; i++) {
    if (num[i] > 1) ok = 1;
    cnt = max(cnt, num[i]);
  }
  if (ok == 0)
    printf("pairwise coprime\n");
  else if (cnt < n)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
