#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (true) {
    if (a % b == 0 || b % a == 0) {
      if (a > b)
        return b;
      else
        return a;
    }
    if (a > b)
      a = a % b;
    else
      b = b % a;
  }
}
int n, a[1000008];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int c = a[1], i, j;
  for (i = 2; i <= n; i++) {
    c = gcd(c, a[i]);
    if (c == 1) {
      cout << "setwise coprime" << endl;
      goto end;
    }
  }
  for (i = 1; i < n; i++) {
    for (j = i + 1; j <= n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        goto a;
      }
    }
  }
a:
  if (i == n && j == n + 1) {
    cout << "pairwise coprime" << endl;
    goto end;
  }
  cout << "not coprime" << endl;
end:
  return 0;
}
