#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int n, a[N], p[N];
bool pd;
inline void re(int &x) {
  x = 0;
  bool flag = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') flag |= (ch == '-'), ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  x = flag ? -x : x;
}
void divd(int x) {
  int i, sqrtx = (int)sqrt(x);
  for (i = 2; i <= sqrtx; i++) {
    if (x % i == 0) {
      p[i]++;
      while (x % i == 0) x /= i;
    }
  }
  if (x > 1) p[x]++;
}
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  int i;
  re(n);
  for (i = 1; i <= n; i++) {
    re(a[i]);
    divd(a[i]);
  }
  for (i = 1; i <= N - 10; i++)
    if (p[i] > 1) pd = 1;
  if (!pd) {
    printf("pairwise coprime");
  } else {
    int g = a[1];
    for (i = 2; i <= n; i++) g = gcd(g, a[i]);
    if (g == 1)
      printf("setwise coprime");
    else
      printf("not coprime");
  }
  return 0;
}
