#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) {
  if (!b) return a;
  return GCD(b, a % b);
}
bool prime[1000001];
int a[1000001];
int b[1000001];
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int gcd = GCD(a[1], a[0]);
  for (int i = 1; i <= n; i++) {
    gcd = GCD(gcd, a[i]);
    int temp = a[i];
    int r = sqrt(a[i]);
    for (int j = 2; j <= r + 1; j++) {
      if (b[j] > 1 || temp == 1) break;
      if (temp % j == 0) {
        b[j]++;
        while (temp % j == 0) temp /= j;
      }
    }
    if (temp != 1) b[temp]++;
  }
  int mx = 0;
  for (int i = 1; i <= 1000000; i++) mx = max(mx, b[i]);
  if (mx > 1 && gcd == 1) printf("setwise coprime");
  if (gcd != 1) printf("not coprime");
  if (gcd == 1 && mx == 1) printf("pairwise coprime");
  return 0;
}
