#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 3;
int N;
int A[MAXN];
bool visited[MAXN];
bool appeared[MAXN];
int main() {
  int max_num = 0;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", A + i);
    max_num = max(max_num, A[i]);
    appeared[A[i]] = true;
  }
  bool has_cd = false, not_pair_wise = false;
  for (int i = 2; i <= max_num; i++) {
    if (visited[i]) continue;
    int c = 0;
    for (int k = i; k <= max_num; k += i) {
      visited[k] = true;
      if (appeared[k]) c++;
    }
    if (c == N) has_cd = true;
    if (c > 1) not_pair_wise = true;
  }
  if (has_cd)
    puts("not coprime");
  else if (not_pair_wise)
    puts("setwise coprime");
  else
    puts("pairwise coprime");
  return 0;
}
