#include <bits/stdc++.h>
using namespace std;
map<long long, int> prime_factor(long long n) {
  map<long long, int> factor;
  return factor;
}
int N;
bool pairwise = true, setwise = true;
int main() {
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  map<long long, long long> factor, f_cnt;
  for (int k = 0; k < N; k++) {
    long long Num = A[k];
    for (long long i = 2LL; i * i <= Num; i++) {
      if (Num % i == 0LL && factor[i] != 0LL) pairwise = false;
      if (Num % i == 0LL) f_cnt[i]++;
      while (Num % i == 0LL) {
        factor[i]++;
        Num /= i;
      }
    }
    if (Num != 1LL) factor[Num] = 1;
  }
  for (auto x : f_cnt)
    if (x.second == N) setwise = false;
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (setwise) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
