#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
vector<pair<long long, long long>> prime_factorize(long long N) {
  vector<pair<long long, long long>> res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<ll> ans;
  for (int j = 0; j < N; j++) {
    const auto &res = prime_factorize(A[j]);
    for (auto p : res) {
      int last_num = 0;
      for (int i = 0; i < p.second; ++i) {
        if (last_num == p.first) continue;
        last_num = p.first;
        ans.push_back(p.first);
      }
    }
  }
  sort(ans.begin(), ans.end());
  bool pair_flag = true;
  int small_sum = 0;
  int max_sum = 0;
  int ans_s = ans.size();
  for (int i = 0; i < ans_s - 1; i++) {
    if (ans[i + 1] == ans[i]) {
      pair_flag = false;
      small_sum++;
      max_sum = max(max_sum, small_sum);
    } else
      small_sum = 1;
  }
  if (pair_flag)
    cout << "pairwise coprime";
  else if (max_sum < N)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
