#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const ll mod = 1e9 + 7;
const ll inf = 1e6;
vector<ll> gcds(inf);
void gcd(ll x) {
  ll k = 1;
  while (k * k <= x) {
    if (k * k == x) {
      ++gcds[k - 1];
    } else if (x % k == 0) {
      ++gcds[k - 1];
      ++gcds[x / k - 1];
    }
    ++k;
  }
}
int main(void) {
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (int)n; ++i) {
    cin >> a[i];
    gcd(a[i]);
  }
  ll l = 0, s = 1e18;
  for (int i = 0; i < (int)inf; ++i) {
    if (i == 0) continue;
    l = max(gcds[i], l);
    s = min(gcds[i], s);
  }
  if (l == n) {
    cout << "not coprime" << endl;
  } else if (l <= 1) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
