#include <bits/stdc++.h>
using namespace std;
int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
int foo(int n, int r) {
  if (n == r) return 1;
  if (r == 1) return n;
  return foo(n - 1, r) + foo(n - 1, r - 1);
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool z = true;
  int k = 0, y, p;
  for (int i = 0; i < n; i++) {
    a[i + 1] = gcd(a[i], a[i + 1]);
    p = a[i + 1];
    if (z == true) {
      for (int j = i + 1; j < n; j++) {
        y = gcd(a[i], a[j]);
        if (y == 1) {
          k++;
          z = true;
        } else
          z = false;
      }
    }
  }
  if (foo(n, 2) == k && z == true) {
    cout << "pairwise coprime" << endl;
  }
  if (p == 1 && z == false) {
    cout << "setwise coprime" << endl;
  } else if (p > 1)
    cout << "not coprime" << endl;
}
