#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
map<ll, int> prime_factor(ll n) {
  map<ll, int> ret;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}
void solve() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  vector<map<ll, int>> m(n);
  map<ll, int> cnt;
  for (int i = 0; i < (n); i++) {
    auto pm = prime_factor(a[i]);
    for (auto p : pm) cnt[p.first]++;
  }
  int mx = 0;
  for (auto c : cnt) {
    (mx = max(mx, c.second));
  };
  if (mx == 1) {
    cout << "pairwise coprime" << endl;
  } else if (mx < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  solve();
  return 0;
}
