#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1.0);
const ll MOD = 1e9 + 7;
const ll INF = 100000000000000;
void printv(vector<ll> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " \n"[i == v.size() - 1];
}
class PF {
 public:
  ll MAXR;
  vector<ll> PN_chk;
  PF(ll n) {
    MAXR = n;
    PN_chk.resize(n + 1, 1);
    ll MAXRR = sqrt(MAXR) + 1;
    PN_chk[0] = 0;
    PN_chk[1] = 0;
    for (ll i = 2; i <= MAXRR; i++) {
      if (PN_chk[i] == 1)
        for (ll j = i; j <= ll(MAXR / i); j++) {
          PN_chk[j * i] = i;
        }
    }
  }
  set<ll> prime_factorize(ll n) {
    set<ll> prime;
    if (n <= 1) {
      prime.insert(1);
      return prime;
    }
    if (PN_chk[n] == 1) {
      prime.insert(n);
      return prime;
    }
    prime.insert(PN_chk[n]);
    prime_factorize(ll(n / PN_chk[n]));
    return prime;
  }
};
ll b[1000005];
ll mx = 1000002;
int main() {
  ll n;
  cin >> n;
  PF pf = PF(mx);
  vector<ll> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  for (ll i = 0; i < n; i++) {
    set<ll> prime = pf.prime_factorize(a[i]);
    for (auto it : prime) b[it]++;
  }
  int f = 1;
  for (ll i = 1; i <= 1000000; i++) {
    if (b[i] == n) {
      f = 3;
      break;
    }
    if (b[i] >= 2) f = 2;
  }
  if (f == 1)
    cout << "pairwise coprime"
         << "\n";
  else if (f == 2)
    cout << "setwise coprime"
         << "\n";
  else if (f == 3)
    cout << "not coprime"
         << "\n";
  return 0;
}
