#include <bits/stdc++.h>
using namespace std;
const int N = 2e6;
int n, a[N], vis[N], prime[N], pcnt;
bool not_prime[N];
void make_table() {
  not_prime[1] = true;
  for (int i = 2; i <= 1000000; ++i) {
    if (!not_prime[i]) prime[++pcnt] = i;
    for (int j = 1; j <= pcnt; ++j) {
      if (i * prime[j] > 1000000) break;
      not_prime[i * prime[j]] = true;
      if (i % prime[j] == 0) break;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), vis[a[i]] = 1;
  int A = 1, B = 0;
  make_table();
  for (int j = 1; j <= pcnt; ++j) {
    int num = prime[j], tmp = 0;
    for (int i = num; i <= 1000000; i += num)
      if (vis[i]) tmp++;
    if (tmp > 1) B = 1;
    if (tmp == n) A = 0;
  }
  if (A == 0)
    puts("not coprime");
  else if (B == 1)
    puts("setwise coprime");
  else
    puts("pairwise coprime");
  return 0;
}
