#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < N; i++) cin >> A[i];
  vector<ll> cnt(1000005, 0);
  vector<ll> primes(1000005, 0);
  for (ll i = 0; i < N; i++) {
    ll a = A[i];
    for (ll j = 2; j * j <= a; j++) {
      if (a % j == 0) {
        primes[j] = 1;
        cnt[j]++;
        for (ll k = 0; k < 100000; k++) {
          a /= j;
          if (a % j != 0) break;
        }
      }
    }
    if (a != 1) {
      cnt[a]++;
    }
  }
  string ans = "pairwise coprime";
  for (ll i = 0; i < 1000005; i++) {
    if (cnt[i] > 1) ans = "setwise coprime";
    if (cnt[i] >= N) ans = "not coprime";
  }
  cout << ans << '\n';
  return 0;
}
