#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T1, typename T2>
bool chmax(T1 &a, T2 b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T1, typename T2>
bool chmin(T1 &a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  ll N;
  cin >> N;
  vector<ll> A(N, 0);
  for (ll i = 0; i < N; ++i) cin >> A[i];
  ll ans = 2;
  map<ll, ll> MP;
  for (ll k = 0; k < N; ++k) {
    ll a = A[k];
    for (ll i = 2; i * i <= a; i++) {
      if (a % i == 0) {
        if (MP[i] > 0) ans = 1;
        MP[i]++;
        while (a % i == 0) a /= i;
      }
    }
    if (a > 1) {
      if (MP[a] > 0) ans = 1;
      MP[a]++;
    }
  }
  if (ans == 2) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (auto v : MP) {
    if (v.second == N) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
}
