#include <bits/stdc++.h>
const int N = 1e6 + 5;
const int SQRT_N = 1000 + 5;
int a[N];
int n;
bool vis[SQRT_N];
int gcd(int x, int y) { return x % y == 0 ? y : gcd(y, x % y); }
int main() {
  std::scanf("%d", &n);
  int gcd_all = 0, gcd_now = 0;
  for (int i = 1; i <= n; i++) {
    std::scanf("%d", &a[i]);
    gcd_all = gcd(gcd_all, a[i]);
  }
  if (gcd_all != 1) {
    std::puts("not coprime");
    return 0;
  }
  bool pair_coprime = true;
  for (int i = n; i >= 1; i--) {
    for (int j = 2; j * j <= a[i]; j++)
      if (a[i] % j == 0) {
        if (vis[j]) goto _setwise_coprime_;
        vis[j] = true;
      }
  }
  std::puts("pairwise coprime");
  return 0;
_setwise_coprime_:
  std::puts("setwise coprime");
  return 0;
}
