#include <bits/stdc++.h>
using namespace std;
map<long long, long long> noCnt, prCnt;
void solve() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    noCnt[a]++;
  }
  bitset<(long long)(7e5 + 10)> b;
  for (long long i = 2; i < (long long)(7e5 + 10); i++) {
    if (!b[i]) {
      for (long long j = i; j < (long long)(7e5 + 10); j += i) {
        if (noCnt.count(j)) prCnt[i] += noCnt[j];
        b[j] = true;
      }
    }
  }
  long long hasOne = 0, hasAll = 0;
  long long got = prCnt.size();
  for (auto it : prCnt) {
    if (it.second == 1) hasOne++;
    if (it.second == n) hasAll++;
  }
  if (hasOne == got)
    cout << "pairwise coprime" << endl;
  else if (!hasAll)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cin.tie(nullptr);
  long long t_c = 1;
  while (t_c--) solve();
}
