#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1.0);
const ll MOD = 1e9 + 7;
const ll INF = 100000000000;
void debug_out() { cout << "\n"; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << H << " ";
  debug_out(T...);
}
set<ll> PrimeFactorization(ll n) {
  set<ll> ret;
  for (ll i = 2; i <= sqrt(n); i++) {
    while (n % i == 0) {
      ret.insert(i);
      n /= i;
    }
    if (n == 1) break;
  }
  if (n != 1) ret.insert(n);
  return ret;
}
ll b[1000005];
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  for (ll i = 0; i < n; i++) {
    set<ll> pf = PrimeFactorization(a[i]);
    for (auto it : pf) b[it]++;
  }
  int f = 1;
  for (ll i = 1; i <= n; i++) {
    if (b[i] == n) {
      f = 3;
      break;
    }
    if (b[i] >= 2) f = 2;
  }
  if (f == 1)
    cout << "pairwise coprime"
         << "\n";
  else if (f == 2)
    cout << "setwise coprime"
         << "\n";
  else if (f == 3)
    cout << "not coprime"
         << "\n";
  return 0;
}
