#include <bits/stdc++.h>
using namespace std;
int n, a[4000005], ok;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int cmp(int x, int y) { return x < y; }
int cmp2(int x, int y) { return x % 2 < y % 2; }
int main() {
  ok = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + 1 + n, cmp);
  for (int i = 1; i < n; i++) {
    if (gcd(a[i], a[i + 1]) != 1) {
      ok = 1;
      break;
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (gcd(a[i], a[i + 2]) != 1) {
      ok = 1;
      break;
    }
  }
  sort(a + 1, a + 1 + n, cmp2);
  for (int i = 1; i < n; i++) {
    if (gcd(a[i], a[i + 1]) != 1) {
      ok = 1;
      break;
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (gcd(a[i], a[i + 2]) != 1) {
      ok = 1;
      break;
    }
  }
  if (ok == 1) {
    ok = 0;
    int zz = gcd(a[1], a[2]);
    for (int i = 1; i <= n; i++) zz = gcd(zz, a[i]);
    if (zz == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
    exit(0);
  }
}
