#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pll = pair<ll, ll>;
using Pii = pair<int, int>;
constexpr int INF = 1 << 30;
constexpr ll LINF = 1LL << 60;
constexpr ll MOD = 1000000007;
constexpr long double EPS = 1e-10;
constexpr int dyx[4][2] = {{0, 1}, {-1, 0}, {0, -1}, {1, 0}};
ll gcd(ll a, ll b) {
  if (b == 0LL) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<ll> a(n);
  ll g = 0LL;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (i)
      g = gcd(g, a[i]);
    else
      g = a[0];
  }
  vector<int> spf(1000001, 0);
  for (ll i = 2LL; i * i <= 1000000; ++i) {
    if (spf[i]) continue;
    spf[i] = i;
    ll j = i + i;
    while (j * j <= 1000000) {
      if (spf[j] == 0) spf[j] = i;
      j += i;
    }
  }
  for (int i = 0; i <= 1000000; ++i)
    if (spf[i] == 0) spf[i] = i;
  set<ll> used;
  for (int i = 0; i < n; ++i) {
    while (a[i] != 1) {
      if (used.find(spf[a[i]]) != used.end()) {
        if (g == 1LL) {
          cout << "setwise coprime\n";
        } else {
          cout << "not coprime\n";
        }
        return 0;
      }
      used.insert(spf[a[i]]);
      int s = spf[a[i]];
      while (a[i] % s == 0LL) a[i] /= s;
    }
  }
  cout << "pairwise coprime\n";
  return 0;
}
