#include <bits/stdc++.h>
using namespace std;
using ll = long long;
long long ncr(int n, int r) {
  if (r > n - r) r = n - r;
  long long ans = 1;
  int i;
  for (i = 1; i <= r; i++) {
    ans *= n - r + i;
    ans /= i;
  }
  return ans;
}
ll mod(ll a, ll b, ll m) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    ll y = mod(a, b / 2, m);
    return (y * y) % m;
  } else {
    return ((a % m) * mod(a, b - 1, m)) % m;
  }
}
ll modinv(ll a, ll m) { return mod(a, m - 2, m); }
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  ll prod = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    prod *= a[i];
  }
  ll ans = a[0];
  for (int i = 1; i < n; i++) {
    ans = (((a[i])) / (gcd(a[i], ans))) * ans;
  }
  if (ans == prod) {
    cout << "pairwise coprime";
  } else {
    ll p = a[0];
    for (int i = 0; i < n; i++) p = gcd(p, a[i]);
    if (p == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
  return 0;
}
