#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using MaxHeap = priority_queue<T>;
template <class T>
using MinHeap = priority_queue<T, vector<T>, greater<T>>;
const double PI = 3.141592653589793238462643383279;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 55;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
map<ll, ll> prime_factor(ll n) {
  map<ll, ll> ret;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return move(ret);
};
signed main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < N; i++) cin >> A[i];
  map<ll, ll> m;
  bool is_pairwise = true;
  for (ll i = 0; i < N; i++) {
    auto pf = prime_factor(A[i]);
    for (auto it = pf.begin(); it != pf.end(); it++) {
      m[it->first]++;
      if (m[it->first] >= 2) is_pairwise = false;
    }
  }
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll g = A[0];
  for (ll i = 1; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
