#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int INF = 1001001001;
struct Sieve {
  ll n;
  vector<ll> f, primes;
  Sieve(ll n = 1) : n(n), f(n + 1, 0) {
    f[0] = f[1] = -1;
    for (ll i = 2; i <= n; i++) {
      if (f[i]) continue;
      primes.emplace_back(i);
      f[i] = i;
      for (ll j = i * i; j <= n; j += i)
        if (!f[j]) f[j] = i;
    }
  }
  bool isPrime(const ll x) { return f[x] == x; }
  vector<ll> factorList(ll x) {
    vector<ll> res;
    while (x != 1) {
      res.emplace_back(f[x]);
      x /= f[x];
    }
    return res;
  }
  vector<pair<ll, ll>> factor(const ll x) {
    vector<ll> fl = factorList(x);
    if (fl.size() == 0) return {};
    vector<pair<ll, ll>> res(1, pair<ll, ll>(fl[0], 0));
    for (ll p : fl) {
      if (res.back().first == p)
        res.back().second++;
      else
        res.emplace_back(pair<ll, ll>(p, 1));
    }
    return res;
  }
};
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main(void) {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = (0); i < (n); i++) cin >> a[i];
  Sieve s(100000);
  map<ll, ll> mp;
  for (ll i = (0); i < (n); i++) {
    auto fl = s.factorList(a[i]);
    for (ll x : fl) {
      mp[x]++;
    }
  }
  bool pc = true;
  for (auto p : mp) {
    if (p.second > 1) pc = false;
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll g = 0;
  for (ll i = (0); i < (n); i++) g = gcd(g, a[i]);
  if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
