#include <bits/stdc++.h>
using namespace std;
int s[int(1e6 + 1)], prime[int(1e6 + 1)], sum;
bool ip[int(1e6 + 1)];
int main() {
  ip[1] = true;
  for (int i = 2; i <= int(sqrt(int(1e6 + 1))); i++)
    if (!ip[i]) {
      for (int j = i * 2; j <= int(1e6 + 1); j += i) ip[j] = true;
    }
  for (int i = 1; i <= int(1e6 + 1); i++)
    if (!ip[i]) {
      sum++;
      prime[sum] = i;
    }
  int n;
  scanf("%d", &n);
  int a[n + 1];
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    if (!ip[a[i]])
      s[a[i]]++;
    else
      for (int j = 1; a[i] != 1; j++)
        if (a[i] % prime[j] == 0) {
          s[prime[j]]++;
          while (a[i] % prime[j] == 0) a[i] /= prime[j];
        }
  }
  bool f = true;
  for (int i = 1; i <= int(1e6); i++) {
    if (s[i] == n) {
      printf("%s\n", "not coprime");
      return 0;
    }
    if (s[i] >= 2) f = false;
  }
  if (!f)
    printf("%s\n", "setwise coprime");
  else
    printf("%s\n", "pairwise coprime");
  return 0;
}
