#include <bits/stdc++.h>
using namespace std;
using llong = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
constexpr int INF = 1e9;
constexpr double EPS = 1e-9;
constexpr int MOD = 1e9 + 7;
template <class Type>
void line(const Type &a) {
  int cnt = 0;
  for (const auto &elem : a) {
    cerr << (cnt++ ? ' ' : '>');
    cerr << elem;
  }
  cerr << endl;
}
template <typename Type>
Type igcd(Type x, Type y) {
  return (y == 0) ? x : igcd(y, x % y);
}
template <typename Type>
Type ilcm(Type x, Type y) {
  return x / igcd(x, y) * y;
}
struct Sieve {
  int n;
  vi fac;
  vi prime;
  Sieve(int n_) : n(n_), fac(n + 1, 0) {
    fac[0] = fac[1] = -1;
    for (int i = 2; i <= n; ++i) {
      if (!fac[i]) {
        fac[i] = i;
        prime.push_back(i);
        for (int j = i + i; j <= n; j += i) fac[j] = i;
      }
    }
  }
  bool is_prime(int x) { return fac[x] == x; }
  map<int, int> prime_factor(int x) {
    map<int, int> res;
    while (x > 1) {
      res[fac[x]]++;
      x /= fac[x];
    }
    return res;
  }
};
int main() {
  string ans[] = {"pairwise coprime", "setwise coprime", "not coprime"};
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  Sieve ob((int)1e6);
  bool jud = false;
  set<int> st;
  int g = a[n - 1];
  for (long long i = (n - 1); ((n - 1) < (0) ? i <= (0) : i >= (0));
       ((n - 1) < (0) ? ++i : --i)) {
    g = igcd(g, a[i]);
    int tmp = a[i];
    bool hoge = true;
    while (1) {
      if (ob.fac[tmp] == tmp) {
        if (st.find(ob.fac[tmp]) != st.end()) hoge = false;
        st.insert(ob.fac[tmp]);
        break;
      } else {
        if (st.find(ob.fac[tmp]) != st.end()) hoge = false;
        st.insert(ob.fac[tmp]);
        tmp /= ob.fac[tmp];
      }
    }
    if (i != n - 1 and hoge) jud = true;
  }
  int flag;
  if (jud)
    flag = 0;
  else if (g == 1)
    flag = 1;
  else
    flag = 2;
  cout << ans[flag] << endl;
}
