#include <bits/stdc++.h>
int prime[100006], pcnt, aprime[100006];
int n, a[1000006], pairwise = 1, setwise = 1;
void get_prime() {
  bool is[1000006] = {false};
  is[1] = true;
  for (int i = 2; i <= 1000006; i++) {
    if (is[i]) continue;
    for (int j = 2 * i; j <= 1000006; j += i) is[j] = true;
  }
  for (int i = 1; i <= 1000006; i++)
    if (!is[i]) prime[++pcnt] = i;
  return;
}
void depart(int x) {
  if (x == 1) return;
  int i = 1;
  while (x % prime[i] != 0) i++;
  while (x != 1) {
    if (x % prime[i] != 0) aprime[i]++;
    while (x % prime[i] != 0) i++;
    x /= prime[i];
  }
  aprime[i]++;
  return;
}
void judge() {
  for (int i = 1; i <= n; i++) depart(a[i]);
  for (int i = 1; i <= pcnt; i++) {
    if (aprime[i] > 1) pairwise = 0;
    if (aprime[i] == n) setwise = 0;
  }
  return;
}
int main() {
  get_prime();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  judge();
  if (pairwise = 1)
    printf("pairwise coprime");
  else if (setwise = 1)
    printf("setwise coprime");
  else
    printf("not coprime");
  return 0;
}
