#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void in(T &x) {
  x = 0;
  char c = getchar();
  bool fu = 0;
  while (c < '0' || c > '9') {
    if (c == '-') fu = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
}
int n, a[1000005], has[1000005];
bool not_prime[1000005], pairwise = 1, setwise = 1;
void produce(int lim) {
  not_prime[1] = 1;
  for (int i = 2; i <= lim; ++i) {
    if (!not_prime[i]) {
      bool flag = 0;
      int cnt = 0;
      if (has[i]) flag = 1, ++cnt;
      for (int j = i + i; j <= lim; j += i) {
        not_prime[j] = 1;
        if (has[j]) {
          if (flag)
            pairwise = 0;
          else
            flag = 1;
          ++cnt;
        }
      }
      if (cnt == n) setwise = 0;
    }
  }
}
int main() {
  in(n);
  bool flag = 0;
  for (int i = 0; i < n; ++i) {
    in(a[i]), has[a[i]] = 1;
    if (a[i] == 1) {
      flag = 1;
    }
  }
  produce(1000005 - 1);
  if (flag) setwise = 1;
  if (pairwise)
    puts("pairwise coprime");
  else if (setwise)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
