#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
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;
}
ll mod = 1e9 + 7;
ll MOD = 1e9 + 7;
ll INF = 1e18;
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  ll n;
  cin >> n;
  vector<ll> vec(n);
  for (int i = 0; i < (int)(n); i++) cin >> vec[i];
  map<ll, ll> mp;
  bool h1 = false;
  ll tempGCD = vec[0];
  for (int i = 0; i < (int)(n); i++) {
    tempGCD = GCD(tempGCD, vec[i]);
  }
  if (tempGCD != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < (int)(n); i++) {
    ll temp = vec[i];
    vector<ll> tempvec;
    for (ll(j) = (2); (j) < (sqrt(vec[i]) + 1); ++(j)) {
      while (temp % j == 0) {
        temp /= j;
        tempvec.push_back(j);
        if (mp[j] != 0) {
          h1 = true;
        }
      }
    }
    for (auto j : tempvec) {
      mp[j]++;
    }
  }
  if (!h1) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
