#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define IFOR(i, m, n) for (ll i = n - 1; i >= m; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
#define FOREACH(x, a) for (auto&(x) : (a))
#define ALL(v) (v).begin(), (v).end()
#define SZ(x) ll(x.size())

vector<int> Eratosthenes(ll n) {
  vector<int> res(n + 1, 1);
  res[0] = res[1] = 0;
  for (ll i = 2; i * i <= n; i++)
    if (res[i]) {
      for (ll j = 2; i * j <= n; j++) res[i * j] = 0;
    }
  vector<int> res2;
  FOR(i, 2, n + 1) {
    if (res[i]) {
      res2.push_back(i);
    }
  }
  return res2;
}

int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  REP(i, n) { cin >> a[i]; }
  vector<int> primes = Eratosthenes(1e6 + 10);
  ll g = 0;
  REP(i, n) { g = gcd(g, a[i]); }

  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }

  REP(i, n) {
    ll cnt = 0;
    for (ll p : primes) {
      if (a[i] % p == 0) {
        cnt++;
      }
    }

    if (cnt >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }

  cout << "pairwise coprime" << endl;
  return 0;
}