#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
constexpr ll INF = (ll)1e9;
constexpr ll mod = (ll)1e9 + 7;
constexpr double PI = 3.1415926535897932;
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;
}
inline void init() {
  cin.tie(nullptr);
  cout.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
}
ll gcd(ll x, ll y) { return (y ? gcd(y, x % y) : x); }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
vector<int> prime(1000010, 1);
int main() {
  init();
  prime[0] = 0;
  prime[1] = 0;
  for (int i = 2; i * i < prime.size(); ++i) {
    if (prime[i] == 1) {
      for (int j = i; j < prime.size(); j += i) {
        prime[j] = i;
      }
    }
  }
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int(i) = (0); (i) < (N); ++(i)) cin >> vec[i];
  set<int> st;
  ll g = vec[0];
  bool ok = true;
  for (int(i) = (0); (i) < (N); ++(i)) {
    g = gcd(g, vec[i]);
    set<int> st2 = st;
    int v = vec[i];
    while (v != 1) {
      if (st2.count(prime[v])) ok = false;
      st.insert(prime[v]);
      v /= prime[v];
    }
  }
  if (ok) {
    puts("pairwise coprime");
    return 0;
  } else if (g == 1) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
