#include <bits/stdc++.h>
using namespace std;
long long gcd(long long val1, long long val2) {
  long long _val_lrg = (val1 > val2) ? val1 : val2;
  long long _val_sml = (val1 > val2) ? val2 : val1;
  long long r = _val_lrg % _val_sml;
  if (r == 0) {
    return _val_sml;
  } else {
    return gcd(_val_sml, r);
  }
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (N); i++) cin >> A[i];
  sort(A.begin(), A.end());
  long long val = 1;
  for (int i = 0; i < (N); i++) {
    val *= A[i];
  }
  bool bl_pairwise_coprime = true;
  for (int i = 0; i < (N - 1); i++) {
    val /= A[i];
    long long tmp = gcd(A[i], val);
    if (tmp != 1) {
      bl_pairwise_coprime = false;
      break;
    }
  }
  val = A[0];
  for (int i = 0; i < (N - 1); i++) {
    val = gcd(val, A[i + 1]);
    if (val == 1) break;
  }
  bool bl_setwise_coprime = (val == 1) ? true : false;
  if (bl_pairwise_coprime) {
    cout << "pairwise coprime" << endl;
  } else if (bl_setwise_coprime) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
