#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, a[N], cnt[N], flag1 = true, flag2, GCD;
int Gcd(int a, int b) { return b ? Gcd(b, a % b) : a; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  GCD = a[1];
  for (int i = 2; i <= n; i++) GCD = Gcd(GCD, a[i]);
  if (GCD == 1) flag2 = true;
  for (int i = 1; i <= n; i++) {
    for (int k = 2; k * k <= a[i]; k++)
      if (a[i] % k == 0) {
        while (a[i] % k == 0) a[i] /= k;
        if (++cnt[k] > 1)
          return puts(flag2 ? "setwise coprime" : "not coprime"), 0;
      }
    if (a[i] > 1) cnt[a[i]]++;
  }
  puts("pairwise coprime");
  return 0;
}
