#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 = 100000000000;
void debug_out() { cout << "\n"; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << H << " ";
  debug_out(T...);
}
ll MAXR = 1000001;
vector<ll> PN_chk(MAXR + 1, 1);
void se() {
  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;
void prime_factorize(ll n) {
  if (n <= 1) return;
  if (PN_chk[n] == 1) {
    prime.insert(n);
    return;
  }
  prime.insert(PN_chk[n]);
  prime_factorize(ll(n / PN_chk[n]));
}
ll b[1020];
int main() {
  se();
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  for (ll i = 0; i < n; i++) {
    prime.clear();
    prime_factorize(a[i]);
    for (auto it : prime) b[it]++;
  }
  int f = 1;
  for (ll i = 1; i <= 1010; 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;
}
