#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
vector<ll> PN_chk(1000000 + 1, 1);
void init_eratosthenes() {
  PN_chk[0] = 0;
  PN_chk[1] = 0;
  for (int i = 2; i <= sqrt(1000000) + 1; i++) {
    if (PN_chk[i] == 1) {
      for (int j = 2; j <= 1000000 / i; j++) {
        PN_chk[j * i] = i;
      }
    }
  }
}
set<ll> prime;
void prime_factorize(ll n) {
  if (n <= 1) return;
  if (PN_chk[n] == 1) {
    prime.insert(n);
    return;
  }
  prime.insert(PN_chk[n]);
  prime_factorize(ll(n / PN_chk[n]));
}
ll gcd(ll a, ll b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
  init_eratosthenes();
  int n;
  cin >> n;
  set<int> s;
  bool pairwise = true;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    prime_factorize(a[i]);
    for (int j = 0; j < prime.size(); j++) {
      if (!s.count(*begin(prime))) {
        s.insert(*begin(prime));
        prime.erase(*begin(prime));
        set<ll> x;
        prime = x;
      } else {
        pairwise = false;
      }
    }
  }
  if (pairwise == true) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else {
    ll p = a[0];
    for (int i = 1; i < n; i++) {
      p = gcd(p, a[i]);
    }
    if (p == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
