#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
vector<ll> prime_factor(ll n) {
  vector<ll> pf;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      pf.push_back(i);
      while (n % i == 0) {
        n /= i;
      }
    }
  }
  return pf;
}
int main() {
  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" << endl;
    return 0;
  }
  map<ll, bool> mp;
  for (int i = 0; i < n; i++) {
    vector<ll> p;
    p = prime_factor(a[i]);
    for (auto v : p) {
      if (mp[v]) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      mp[v] = true;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
