#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using WGraph = vector<vector<pair<int, ll>>>;
template <class T>
inline bool chmax(T &a, const T &b) {
  if (b > a) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
constexpr int dx[4] = {-1, 0, 0, 1}, dy[4] = {0, -1, 1, 0};
constexpr int INF = 1e9;
constexpr int MOD = 1e9 + 7;
constexpr long long LINF = 1e18;
constexpr double EPS = 1e-10;
constexpr double PI = M_PI;
long long gcd(long long a, long long b) {
  if (a < b) std::swap(a, b);
  if (b == 0) return a;
  while (b > 0) {
    long long tmp = b;
    b = a % b;
    a = tmp;
  }
  return a;
}
void solve() {
  int N;
  cin >> N;
  vector<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]);
  if (g > 1) {
    cout << "not coprime" << '\n';
    return;
  }
  set<ll> st;
  for (ll x : A) {
    vector<ll> used;
    for (ll i = 2; i * i <= x; ++i) {
      if (x % i == 0) {
        if (st.count(i)) {
          cout << "setwise coprime" << '\n';
          return;
        }
        used.push_back(i);
        while (x % i == 0) x /= i;
      }
    }
    if (x != 1) used.push_back(x);
    for (ll y : used) st.insert(y);
  }
  cout << "pairwise coprime" << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  solve();
  return 0;
}
