#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T>
using V = vector<T>;
const ll inf = (1e18);
const ll mod = 1000000007;
ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }
ll LCM(ll c, ll d) { return c / GCD(c, d) * d; }
struct __INIT {
  __INIT() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
  }
} __init;
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 (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
vector<int> prime;
void make(ll num) {
  prime.resize(num + 1, 0);
  for (ll i = 2; i * i <= num; i++) {
    if (!prime[i]) {
      for (ll j = i; j <= num; j += i) {
        if (!prime[j]) prime[j] = i;
      }
    }
  }
}
ll cnt[1000005];
int main() {
  make(1000005);
  int n;
  cin >> n;
  ll a, d;
  ll g = -1;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (g == -1)
      g = a;
    else
      g = GCD(g, a);
    while (a > 1) {
      cnt[prime[a]]++;
      d = prime[a];
      while (a % d == 0) a /= d;
    }
  }
  bool ok = true;
  for (int i = 2; i < 100005; i++) {
    if (cnt[i] >= 2) ok = false;
  }
  if (ok) {
    cout << "pairwise coprime"
         << "\n";
  } else {
    cout << (g == 1 ? "setwise coprime" : "not coprime") << "\n";
  }
}
