#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T>
using V = vector<T>;
const ll inf = (1e18);
const ll mod = 1000000007;
ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }
ll LCM(ll c, ll d) { return c / GCD(c, d) * d; }
struct __INIT {
  __INIT() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
  }
} __init;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
vector<bool> prime;
void make(ll num) {
  prime.resize(num, true);
  prime[0] = false;
  for (ll i = 0; i * i < num; i++) {
    if (prime[i]) {
      for (ll j = 2; (i + 1) * j <= num; j++) {
        prime[(i + 1) * j - 1] = false;
      }
    }
  }
}
int main() {
  make(1000100);
  V<ll> d;
  for (int i = 0; i < 1004; i++) {
    if (prime[i]) d.emplace_back(i + 1);
  }
  int n;
  cin >> n;
  V<ll> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll g = a[0];
  for (int i = 1; i < n; i++) {
    g = GCD(g, a[i]);
  }
  bool ok = true;
  reverse((a).begin(), (a).end());
  set<ll> s;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < d.size(); j++) {
      if (a[i] % d[j] == 0) {
        if (s.find(d[j]) != s.end()) {
          ok = false;
        } else {
          s.insert(d[j]);
        }
      }
    }
    if (!ok) break;
  }
  sort((a).begin(), (a).end());
  for (int i = 0; i < n - 1; i++) {
    if (a[i] != 1 && a[i] == a[i + 1]) ok = false;
  }
  if (ok) {
    cout << "pairwise coprime"
         << "\n";
  } else {
    cout << (g == 1 ? "setwise coprime" : "not coprime") << "\n";
  }
}
