#include <bits/stdc++.h>
const int N = 1000005;
int a[N], n;
bool st[N];
bool insert(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) {
      while (x % i == 0) x /= i;
      if (st[i]) return true;
      st[i] = true;
    }
  if (x > 1) st[x] = true;
  return false;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  scanf("%d", &n);
  bool flag = true;
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    if (insert(a[i])) flag = false;
  }
  if (flag) return puts("pairwise coprime"), 0;
  int d = a[n];
  for (int i = 1; i < n; i++) {
    d = gcd(d, a[i]);
    if (d == 1) return puts("setwise coprime"), 0;
  }
  puts("not coprime");
  return 0;
}
