#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int BIG = 1000000007;
int main() {
  ll n;
  cin >> n;
  vector<ll> a(100001, 0);
  bool pc = true;
  bool sc = true;
  for (ll i = 0; i < n; ++i) {
    ll l;
    cin >> l;
    ++a[l];
    if (a[l] > 1) pc = false;
  }
  for (ll i = 2; i < a.size(); ++i) {
    ll j = i * 2;
    ll k = 0;
    if (a[i]) ++k;
    while (j < a.size()) {
      if (a[j]) {
        if (k > 0) pc = false;
        k += a[j];
      }
      j += i;
    }
    if (k == n) sc = false;
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
  } else if (sc) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
