#include <bits/stdc++.h>
int gcd(int a, int b) {
  while (b > 0) {
    int r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int N;
int A[1123456];
int era[1123456];
char exists[1123456];
char exists2[1123456];
int main(void) {
  int i, j;
  int good = 1;
  if (scanf("%d", &N) != 1) return 1;
  for (i = 0; i < N; i++) {
    if (scanf("%d", &A[i]) != 1) return 1;
  }
  for (i = 2; i < 1123456; i++) {
    if (era[i] == 0) {
      era[i] = i;
      for (j = i + i; j < 1123456; j += i) {
        if (era[j] == 0) era[j] = i;
      }
    }
  }
  for (i = 0; i < N; i++) {
    if (A[i] > 1) {
      if (exists[A[i]]) {
        puts("not coprime");
        return 0;
      }
      exists[A[i]] = 1;
      if (exists[era[A[i]]]) good = 0;
      exists[era[A[i]]] = 1;
      j = A[i] / era[A[i]];
      while (j > 1) {
        if (exists[era[A[i]]]) good = 0;
        exists[era[A[i]]] = 1;
        j /= era[A[i]];
      }
    }
  }
  if (good) {
    puts("pairwise coprime");
  } else {
    int g = A[0];
    for (i = 1; i < N; i++) g = gcd(g, A[i]);
    printf("%s coprime\n", g == 1 ? "setwise" : "not");
  }
  return 0;
}
