#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pe = pair<int, int>;
vector<pe> prime_factorize(ll num) {
  vector<pe> result;
  for (ll i = 2; i * i <= num; i++) {
    if (num % i != 0) continue;
    ll e = 0;
    while (num % i == 0) {
      e++;
      num /= i;
    }
    result.push_back({i, e});
  }
  if (num != 1) result.push_back({num, 1});
  return result;
}
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  map<int, int> prime_count;
  for (int i = 0; i < N; i++) {
    vector<pe> prims = prime_factorize(A[i]);
    for (auto elem : prims) {
      prime_count[elem.first]++;
    }
  }
  bool isPairwise = true;
  bool isSetwise = true;
  for (auto const& elem : prime_count) {
    if (elem.second != 1) {
      isPairwise = false;
    }
    if (elem.second == N) {
      isSetwise = false;
    }
  }
  if (isPairwise) {
    cout << "pairwise coprime" << endl;
  } else if (isSetwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "no coprime" << endl;
  }
  return 0;
}
