#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll mod = 1000000007;
ll NMAX = 1000007;
ll gcd(ll a, ll b) {
  ll r = a % b;
  while (r > 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
vector<ll> eratosthenes(ll n) {
  vector<ll> list(n + 1, 1);
  for (int i = 0; i <= n; i++) {
    list.at(i) = 1;
  }
  ll upper = ceil(sqrt(n));
  for (ll i = 2; i <= upper; i++) {
    if (list.at(i) == 1) {
      list.at(i) = i;
      ll cnt = 2 * i;
      while (cnt <= n) {
        if (list.at(cnt) == 1) {
          list.at(cnt) = i;
        }
        cnt += i;
      }
    }
  }
  return (list);
}
int main() {
  ll n;
  vector<ll> a(NMAX);
  const vector<ll> list = eratosthenes(NMAX);
  vector<ll> cnt(NMAX, 0);
  cin >> n;
  for (ll i = 0; i < (n); ++i) {
    cin >> a[i];
    cnt[list[a[i]]]++;
  }
  for (ll i = 2; i < NMAX; i++) {
    if (cnt[i] == 1 && list[i] == i) {
      ll j = 2 * i;
      while (j < NMAX) {
        cnt[j]++;
        j += i;
      }
    }
  }
  bool pairwise = true;
  for (ll i = 0; i < (n); ++i) {
    if (cnt[a[i]] != 1) pairwise = false;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return (0);
  }
  ll g = gcd(a[0], a[1]);
  for (ll i = 2; i < n; i++) {
    g = gcd(a[i], g);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return (0);
}
