#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
map<ll, ll> m;
set<ll> s;
void primeFactorization(ll n) {
  ll num = n;
  m[1]++;
  for (ll i = 2; i <= sqrt(n); ++i) {
    if (num % i == 0) {
      m[i]++;
      s.insert(i);
      num /= i;
    }
    if (num == 1) break;
  }
  m[n]++;
  s.insert(n);
  return;
}
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  s.insert(1);
  for (ll i = 0; i < (ll)n; ++i) {
    cin >> a.at(i);
    primeFactorization(a.at(i));
  }
  ll cnt = 0;
  for (auto p : s) {
    if (p != 1 && m[p] != 1) {
      break;
    }
    cnt++;
    if (cnt == (ll)s.size()) {
      cout << "pairwise coprime" << endl;
      return 0;
    }
  }
  ll ans = 0;
  for (auto p : s) {
    if (m[p] == n) ans = max(ans, p);
  }
  if (ans != 1)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
