#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int a[N], q[N], v[N];
void prime() {
  for (int i = 2; i <= N; i++) {
    if (v[i]) continue;
    for (int j = i; j <= N / i; j++) v[i * j] = 1;
  }
}
bool gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  prime();
  int tests = 1;
  while (tests--) {
    int x = 0, y = 0, z = 0;
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      if (v[a[i]] == 0) {
        x++;
      }
    }
    for (int i = 0; i < n - 1; i++) {
      a[i + 1] = gcd(a[i], a[i] + 1);
      if (a[i + 1] == 1) {
        y++;
        break;
      }
    }
    if (x == n)
      puts("pairwise coprime");
    else if (y)
      puts("setwise coprime");
    else
      puts("not coprime");
  }
  return 0;
}
