#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
struct myset {
  myset() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  }
};
using ll = long long;
using ld = long double;
using dou = double;
const int inf = 1 << 30;
const ll INF = 1LL << 60;
const dou pi = 3.14159265358;
const ll mod1 = 1000000007LL;
const ll mod2 = 998244353LL;
ostream& operator<<(ostream& os, const pair<ll, ll> q) {
  os << q.first << "," << q.second;
  return os;
}
template <class T, class U>
inline bool chmin(T& a, const U& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class U>
inline bool chmax(T& a, const U& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class U>
inline bool change(T& a, U& b) {
  if (a > b) {
    swap(a, b);
    return 1;
  }
  return 0;
}
ll modpow(ll n, ll m, ll MOD) {
  if (m == 0) return 1;
  if (m < 0) return -1;
  ll res = 1;
  while (m) {
    if (m & 1) res = (res * n) % MOD;
    m >>= 1;
    n *= n;
    n %= MOD;
  }
  return res;
}
ll mypow(ll n, ll m) {
  if (m == 0) return 1;
  if (m < 0) return -1;
  ll res = 1;
  while (m) {
    if (m & 1) res = (res * n);
    m >>= 1;
    n *= n;
  }
  return res;
}
template <class T>
T gcd(T a, T b) {
  a = abs(a);
  b = abs(b);
  if (a == 0)
    return b;
  else if (b == 0)
    return a;
  if (a < b) swap(a, b);
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
inline bool isp(T n) {
  bool res = true;
  if (n == 1)
    return false;
  else {
    for (ll i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        res = false;
        break;
      }
    }
    return res;
  }
}
const ll cmax = 1000000;
vector<ll> fac(cmax), finv(cmax), inv(cmax);
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (ll i = 2; i < cmax; i++) {
    fac[i] = fac[i - 1] * i % mod1;
    inv[i] = mod1 - inv[mod1 % i] * (mod1 / i) % mod1;
    finv[i] = finv[i - 1] * inv[i] % mod1;
  }
}
ll nCk(ll n, ll k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % mod1) % mod1;
}
template <class T = int>
T in() {
  T x;
  cin >> x;
  return x;
}
inline bool Yes(bool b) {
  cout << (b ? "Yes\n" : "No\n");
  return b;
}
inline bool YES(bool b) {
  cout << (b ? "YES\n" : "NO\n");
  return b;
}
int main() {
  myset m;
  ll N;
  cin >> N;
  vector<ll> vec(N);
  for (int i = 0; i < (int)N; ++i) cin >> vec[i];
  ll all_gcd = vec[0];
  for (int i = 0; i < (int)N; ++i) {
    all_gcd = gcd(all_gcd, vec[i]);
  }
  if (all_gcd != 1) {
    cout << "not coprime\n";
    return 0;
  }
  const ll MAX = 1000000;
  vector<vector<ll>> soin(MAX);
  soin[0] = {0};
  soin[1] = {1};
  for (ll i = 2; i * i <= MAX; i++) {
    if (soin[i].size() == 0) {
      for (ll j = i; j <= MAX; j += i) {
        soin[j].push_back(i);
      }
    }
  }
  map<ll, ll> ma;
  for (int i = 0; i < (int)N; ++i) {
    if (vec[i] == 1) continue;
    if (soin[vec[i]].size() == 0) soin[vec[i]].push_back(vec[i]);
    for (ll j : soin[vec[i]]) {
      if (ma[j]) {
        cout << "setwise coprime\n";
        return 0;
      }
      ma[j]++;
    }
  }
  cout << "pairwise coprime\n";
}
