#include <bits/stdc++.h>
using namespace std;
long long int calc_gcd(long long int v1, long long int v2) {
  if (v1 < v2) swap(v1, v2);
  if (v2 == 0) {
    return v1;
  } else {
    return calc_gcd(v2, v1 % v2);
  }
}
int main(void) {
  int N;
  cin >> N;
  vector<long long int> Array(N);
  for (int i = 0; i < N; i++) {
    cin >> Array[i];
  }
  long long int gcds = Array[0];
  bool flag_prime = true;
  long long int div = 0, rem = Array[0];
  long long int divisor = pow(10, 9) + 7;
  for (int i = 0; i < N - 1; i++) {
    gcds = calc_gcd(gcds, Array[i + 1]);
    if (flag_prime == true) {
      long long int mod = divisor % Array[i + 1];
      long long int r2 = rem % Array[i + 1];
      if (calc_gcd(mod * div % Array[i + 1] + r2, Array[i + 1]) > 1) {
        flag_prime = false;
      }
      div = div * Array[i + 1] % divisor;
      div += Array[i + 1] * rem / divisor;
      rem = Array[i + 1] * rem % divisor;
    }
  }
  if (flag_prime == true) {
    cout << "pairwise coprime" << endl;
  } else if (gcds > 1) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
