#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const int INF = 1e9;
const ll LLINF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-10;
const double PI = acos(-1);
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
T gcd(T x, T y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
template <typename T>
T lcm(T x, T y) {
  T g = gcd(x, y);
  return x / g * y;
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  ll t = 1;
  for (int i = 0; i < n; i++) t *= a[i];
  bool is_pairwise = true;
  for (int i = 0; i < n; i++) {
    ll x = t / a[i];
    ll y = a[i];
    if (x < y) swap(x, y);
    if (gcd(x, y) != 1) is_pairwise = false;
  }
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll g = a[n - 1];
  for (int i = 0; i < n - 1; i++) g = gcd(g, a[i]);
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
