#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll mod = 1000000007;
ll NMAX = 1000007;
vector<ll> prime_list(NMAX);
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() {
  for (int i = 0; i < NMAX; i++) {
    prime_list.at(i) = 1;
  }
  ll upper = ceil(sqrt(NMAX));
  for (ll i = 2; i < upper; i++) {
    if (prime_list.at(i) == 1) {
      prime_list.at(i) = i;
      ll cnt = 2 * i;
      while (cnt < NMAX) {
        if (prime_list.at(cnt) == 1) {
          prime_list.at(cnt) = i;
        }
        cnt += i;
      }
    }
  }
  return (prime_list);
}
vector<ll> prime_factor(ll n) {
  vector<ll> fact(n + 1, 0);
  while (n > 1) {
    fact[prime_list[n]] = 1;
    n = n / prime_list[n];
  }
  return fact;
}
int main() {
  ll n;
  vector<ll> a(NMAX);
  prime_list = eratosthenes();
  vector<ll> cnt(NMAX, 0);
  cin >> n;
  for (ll i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  for (ll i = 0; i < (n); ++i) {
    vector<ll> fact = prime_factor(a[i]);
    for (ll j = 0; j < (a[i] + 1); ++j) {
      cnt[j] += fact[j];
    }
  }
  bool pairwise = true;
  for (ll i = 0; i < (sqrt(NMAX)); ++i) {
    if (cnt[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);
}
