#include <bits/stdc++.h>
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  }
  return gcd(b, a % b);
}
int main() {
  int N;
  static int A[1000000];
  const int MAX = 1000 * 1000;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  static int minp[MAX + 1];
  minp[0] = minp[1] = 1;
  for (int i = 2; i < MAX + 1; i++) {
    if (minp[i] != 0) {
      continue;
    }
    for (int k = 1; i * k < MAX + 1; k++) {
      minp[i * k] = i;
    }
  }
  bool ptable[MAX + 1];
  bool pairwise = true;
  for (int i = 0; i < N; i++) {
    int a = A[i];
    while (a >= 2) {
      int p = minp[a];
      while (a % p == 0) {
        a /= p;
      }
      if (ptable[p]) {
        pairwise = false;
      }
      ptable[p] = true;
    }
  }
  int d = A[0];
  for (int i = 1; i < N; i++) {
    d = gcd(d, A[i]);
  }
  bool setwise = (d == 1);
  if (pairwise) {
    puts("pairwise coprime");
  } else if (setwise) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
