#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t N;
  cin >> N;
  int mx = 0;
  vector<int> nums(N);
  for (int n = 0; n < N; ++n) {
    cin >> nums[n];
    mx = max(mx, nums[n]);
  }
  vector<int> mods(mx + 1);
  mods[1] = 1;
  for (int i = 2, size = mods.size(); i < size; ++i) {
    if (mods[i] != 0) {
      continue;
    }
    mods[i] = i;
    int tmp = i;
    while (tmp + i < size) {
      tmp += i;
      if (mods[tmp] != 0) continue;
      mods[tmp] = i;
    }
  }
  set<int> already;
  unordered_map<int, int> cnt_map;
  bool pairwise = true;
  for (int n : nums) {
    set<int> cur = {n};
    ++cnt_map[n];
    while (n > 1) {
      if (already.count(mods[n])) {
        pairwise = false;
      }
      if (cur.count(mods[n]) == 0) {
        ++cnt_map[mods[n]];
        cur.insert(mods[n]);
      }
      n /= mods[n];
    }
    if (!cur.empty()) {
      already.insert(cur.begin(), cur.end());
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    bool set_wise = true;
    for (const auto& p : cnt_map) {
      if (p.second == N) {
        set_wise = false;
        break;
      }
    }
    if (set_wise) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
