#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
int N;
bool pairwise = true, setwise = true;
int main() {
  clock_t start = clock();
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  map<long long, bool> factor;
  map<long long, long long> 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]) pairwise = false;
      if (Num % i == 0LL) factor[i] = true, f_cnt[i]++;
      while (Num % i == 0LL) Num /= i;
    }
    if (Num != 1LL) {
      if (factor[Num]) pairwise = false;
      factor[Num] = true, f_cnt[Num]++;
    }
    clock_t end = clock();
    if ((double)(end - start) / CLOCKS_PER_SEC > 1.0) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  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;
}
