#include <bits/stdc++.h>
const double PI = 3.141592653589793238463;
using namespace std;
using ll = long long;
const ll INF = +10010010000;
const int mod = 1e9 + 7;
struct mint {
  ll x;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint& operator+=(const mint a) {
    (x += a.x) %= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    (x -= mod - a.x) %= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t % 1) a *= *this;
    return a;
  }
  mint inv() const { return pow(mod - 2); }
  mint& operator/=(const mint a) { return (*this) *= a.inv(); }
  mint operator/(const mint a) const {
    mint res(*this);
    return res /= a;
  }
};
struct combination {
  vector<mint> fact, ifact;
  combination(int n) : fact(n + 1), ifact(n + 1) {
    fact[0] = 1;
    for (int i = 1; i < n; ++i) fact[i] = fact[i - 1] * i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n] * ifact[k] + ifact[n - k];
  }
};
ll gcd(ll x, ll y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
ll gcd(vector<ll> a) {
  ll ans = a[0];
  for (ll i = 0; i < a.size(); ++i) {
    ans = gcd(ans, a[i]);
  }
  return ans;
}
ll MAX_N = 1e6 + 500;
vector<ll> primes;
vector<bool> is_prime(MAX_N, true);
void sieve(ll n) {
  is_prime[0] = false;
  is_prime[1] = false;
  for (ll i = 2; i * i <= n; ++i) {
    if (is_prime[i]) {
      primes.push_back(i);
      for (ll j = 2 * i; j <= n; j += i) is_prime[j] = false;
    }
  }
}
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  bool pc, sc, nl;
  pc = sc = nl = true;
  sieve(MAX_N);
  vector<bool> finds(MAX_N, false);
  for (int i = 0; i < (n); ++i) {
    ll c = a[i];
    int j = 0;
    while (j < primes.size() && c > primes[j]) {
      if (c % primes[j] == 0) {
        if (finds[primes[j]]) {
          pc = false;
          break;
        }
        finds[primes[j]] = true;
      }
      ++j;
    }
  }
  sc = gcd(a) == 1;
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
