#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);
  }
}
long long int pow_mod(long long int base, long long int pow,
                      long long int div) {
  long long int res = 1;
  while (pow > 1) {
    if (pow & 1) {
      res = res * base % div;
    }
    base = base * base % div;
    pow /= 2;
  }
  return res * base % div;
}
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 divisor = pow(10, 9) + 7;
  vector<long long int> powers(N);
  powers[0] = Array[0];
  for (int i = 0; i < N - 1; i++) {
    gcds = calc_gcd(gcds, Array[i + 1]);
    if (flag_prime == true) {
      if (gcds > 1) {
        flag_prime = false;
        continue;
      }
      long long int mod = powers[0];
      long long int mod_div = divisor % Array[i + 1];
      int max_index = 0;
      for (int j = 1; j < N; j++) {
        if (powers[j] == 0) {
          max_index = j - 1;
          break;
        } else
          mod = (mod + powers[j] * pow_mod(mod_div, j, Array[i + 1])) %
                Array[i + 1];
      }
      if (calc_gcd(mod, Array[i + 1]) > 1) {
        flag_prime = false;
        continue;
      }
      for (int j = max_index; j >= 0; j--) {
        powers[j] *= Array[j + 1];
        if (powers[j] > divisor) {
          long long int res = powers[j] / divisor;
          powers[j + 1] += res;
          powers[j] -= res * divisor;
        }
      }
    }
  }
  if (flag_prime == true) {
    cout << "pairwise coprime" << endl;
  } else if (gcds > 1) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
