#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n = 0;
  cin >> n;
  map<int, int> mp;
  bool flag = false;
  size_t tmp = 0;
  auto func = [&](int x) {
    for (int i = 2; i * i <= x; i++) {
      if (x % i == 0) {
        mp[i]++;
        do {
          x /= i;
        } while (x % i == 0);
      }
    }
    if (x != 1) {
      mp[x]++;
    }
    if (mp.size() == tmp) {
      flag = true;
    }
    tmp = mp.size();
  };
  for (int i = 0; i < n; i++) {
    int x = 0;
    cin >> x;
    func(x);
  }
  for (auto &p : mp) {
    if (p.second == n) {
      cout << "not coprime" << '\n';
      return 0;
    }
  }
  if (flag) {
    cout << "setwise coprime" << '\n';
    return 0;
  }
  cout << "pairwise coprime" << '\n';
  return 0;
}
