#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
const long long INF = 1LL << 60;
const double pi = acos(-1.0);
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
vector<pair<long long, long long>> prime_factorize(long long N) {
  vector<pair<long long, long long>> res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  map<ll, ll> mp;
  for (auto a : A) {
    if (a == 1) continue;
    vector<pair<ll, ll>> vec = prime_factorize(a);
    for (auto v : vec) mp[v.first]++;
  }
  string ans = "pairwise coprime";
  for (auto p : mp) {
    if (p.second > 1) ans = "setwise coprime";
    if (p.second >= N) ans = "not coprime";
  }
  cout << ans << endl;
  return 0;
}
