#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll ZER = 0;
vector<ll> sieve(ll n) {
  vector<ll> res(n);
  iota((res).begin(), (res).end(), 0);
  for (int i = 2; i * i < n; i++) {
    if (res[i] < i) continue;
    for (int j = i * i; j < n; j += i) {
      if (res[j] == j) res[j] = i;
    }
  }
  return res;
}
vector<ll> factor(ll n, const vector<ll>& min_factor) {
  vector<ll> res;
  while (n > 1) {
    res.push_back(min_factor[n]);
    n /= min_factor[n];
  }
  return res;
}
ll gcd(ll a, ll b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; (i) < (int)(n); i++) cin >> a[i];
  ll GCD = a[0];
  for (int i = 0; (i) < (int)(n); i++) {
    GCD = gcd(GCD, a[i]);
  }
  if (GCD != 1) {
    cout << "no coprime" << endl;
    return 0;
  }
  auto mf = sieve(100000);
  vector<ll> r;
  map<ll, ll> mp;
  for (int i = 0; (i) < (int)(n); i++) {
    auto r = factor(a[i], mf);
    r.erase(unique((r).begin(), (r).end()), r.end());
    int rs = r.size();
    for (int i = 0; (i) < (int)(rs); i++) {
      mp[r[i]]++;
      if (mp[r[i]] > 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
