#include <bits/stdc++.h>
using namespace std;
vector<int> prime(int N) {
  vector<int> factor(N + 1);
  factor[0] = -1, factor[1] = -1;
  for (int i = 2; i * i <= N; i++) {
    if (factor[i] != 0) continue;
    for (int j = i * 2; j <= N; j += i)
      if (factor[j] == 0) factor[j] = i;
  }
  return factor;
}
vector<int> S(1000000);
map<int, int> prime_factor(int N) {
  map<int, int> prime_factor;
  for (; S[N] != 0; N /= S[N]) prime_factor[S[N]]++;
  prime_factor[N]++;
  return prime_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, bool> factor;
  map<long long, long long> f_cnt;
  S = prime(1000000);
  for (int k = 0; k < N; k++) {
    long long Num = A[k];
    auto p = prime_factor(Num);
    for (auto x : p) {
      if (factor[x.first]) pairwise = false;
      factor[x.first] = true;
      f_cnt[x.first]++;
    }
  }
  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;
}
