#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool prime(int x) {
  for (int i = 2; i * i <= x; ++i) {
    if (x % i == 0) return false;
  }
  return true;
}
vector<pair<int, int>> prime_factory(int x) {
  vector<pair<int, int>> res;
  for (int i = 2; i <= x; ++i) {
    if (x % i == 0 && prime(i)) {
      pair<int, int> p = {i, 1};
      res.push_back(p);
    }
  }
  return res;
}
void solve(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < int(n); ++i) cin >> a[i];
  map<int, int> mp;
  for (int i = 0; i < int(n); ++i) {
    for (auto i : prime_factory(a[i])) mp[i.first] += i.second;
  }
  int flag = false;
  for (auto i : mp) {
    if (i.second > 1) flag = true;
  }
  if (flag) {
    for (auto i : mp) {
      if (i.second == n) {
        cout << "not coprime" << endl;
        return;
      }
    }
    cout << "setwise coprime" << endl;
  } else
    cout << "pairwise coprime" << endl;
}
int main(void) { solve(); }
