#include <bits/stdc++.h>
using namespace std;
map<int, int> cnt;
bool is_prime(long long x) {
  if (x == 1) return false;
  if (x == 2 || x == 3) return true;
  if (x % 6 != 1 && x % 6 != 5) return false;
  int s = sqrt(x);
  for (int i = 5; i <= s; i += 6)
    if (x % i == 0 || x % (i + 2) == 0) return false;
  return true;
}
void pfc(long long n, unordered_set<int> &st) {
  long long i = 0;
  if (n == 1) {
    st.insert(1);
    return;
  }
  while (i < n) {
    if (is_prime(n)) {
      st.insert(n);
      return;
    }
    for (i = 2; i < n; i++) {
      if (n % i == 0) {
        st.insert(i);
        n /= i;
        break;
      }
    }
  }
  st.insert(n);
  return;
}
int Gcd(int a, int b) {
  if (0 == b)
    return a;
  else
    return Gcd(b, a % b);
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  int NG = a[0];
  for (int i = 1; i < n; i++) {
    NG = Gcd(NG, a[i]);
  }
  for (int i = n - 1; i >= 0; i--) {
    unordered_set<int> st;
    pfc(a[i], st);
    for (auto v : st) {
      if (cnt.count(v)) {
        if (NG == 1) {
          cout << "setwise coprime";
          return;
        }
        cout << "not coprime";
        return;
      }
      cnt[v]++;
    }
  }
  cout << "pairwise coprime";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T_ = 1;
  for (int i = 0; i < T_; i++) solve();
  return 0;
}
