#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  long long n, ans = 0;
  cin >> n;
  vector<long long> a(n), f(100000);
  for (int i = 0; i < (n); i++) cin >> a[i];
  long long g = 0;
  for (int i = 0; i < (n); i++) g = gcd(g, a[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  unordered_set<long long> st;
  for (int i = 0; i < (n); i++) {
    long long t = a[i];
    for (long long i = 2; i * i <= a[i]; ++i)
      if (t % i == 0) {
        if (st.count(i)) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        st.insert(i);
        t /= i;
      }
    if (t) st.insert(t);
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
