#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
const int M = 1e6;
int n;
int a[N], f[M + 1];
int p[M + 1];
void seive(int m) {
  vector<int> is_p(m + 1, 1);
  memset(p, 0, sizeof(p));
  int ip = 0;
  for (int i = (0); (i) < (int)(m + 1); ++(i)) is_p[i] = 1;
  is_p[0] = is_p[1] = 0;
  for (int i = (2); (i) < (int)(m + 1); ++(i)) {
    if (is_p[i]) {
      p[ip++] = i;
      for (int j = i * 2; j <= m; j += i) is_p[j] = 0;
    }
  }
}
int gcd(int small, int large) {
  if (small == 0) return large;
  return gcd(small, large % small);
}
int main() {
  memset(f, 0, sizeof(f));
  fscanf(stdin, "%d ", &n);
  for (int i = (0); (i) < (int)(n); ++(i)) {
    fscanf(stdin, "%d ", a + i);
    f[a[i]]++;
  }
  seive(M);
  int pairwise = 1;
  for (int i = (2); (i) < (int)(M + 1); ++(i)) {
    if (p[i] == 0) break;
    int cnt = 0;
    for (int j = p[i]; j <= M; j += p[i]) cnt += f[j];
    if (cnt > 1) pairwise = 0;
  }
  if (pairwise) {
    puts("pairwise coprime");
    return 0;
  }
  int g = 0;
  for (int i = (0); (i) < (int)(n); ++(i)) g = gcd(g, a[i]);
  if (g == 1) {
    puts("setwise coprime");
    return 0;
  }
  puts("not coprime");
  return 0;
}
