#include <bits/stdc++.h>
using namespace std;
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 (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
using P = pair<int, int>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const int INF = 1 << 30;
const ll mod = 1000000007LL;
ll gcd(ll x, ll y) {
  if (x % y == 0) {
    return y;
  } else {
    return gcd(y, x % y);
  }
}
int main() {
  ll N;
  cin >> N;
  vector<ll> v(N);
  for (int i = 0; i < (int)(N); i++) cin >> v[i];
  vector<bool> prime(1000005, true);
  prime[0] = prime[1] = false;
  for (int i = 0; i < (int)(1000005); i++) {
    if (prime[i]) {
      for (ll j = 2LL; i * j < 1000005; j++) prime[i * j] = false;
    }
  }
  vector<ll> P;
  for (int i = 0; i < (int)(1000005); i++) {
    if (prime[i]) P.push_back(i);
  }
  map<ll, ll> m;
  for (int i = 0; i < (int)(N); i++) {
    ll t = v[i];
    for (ll j = 0; P[j] * P[j] <= v[i]; j++) {
      if (t % P[j] == 0) m[P[j]]++;
      while (t % P[j] == 0) {
        t /= P[j];
      }
    }
    if (t != 1) m[t]++;
  }
  bool ok1 = true;
  for (auto x : m) {
    if (x.second >= 2) ok1 = false;
  }
  ll g = v[0];
  for (int i = 0; i < (int)(N - 1); i++) {
    g = gcd(g, v[i + 1]);
  }
  if (ok1)
    cout << "pairwise coprime" << endl;
  else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
