#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int gcd(vector<int> a) {
  int ans = a[0];
  for (int i = 1; i < int(a.size()); i++) {
    ans = gcd(ans, a[i]);
  }
  return ans;
}
set<int> st;
int cnt = 0;
vector<pair<long long, int>> factorize(long long n) {
  vector<pair<long long, int>> res;
  cnt = 0;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i) continue;
    cnt++;
    st.insert(i);
    res.emplace_back(i, 0);
    while (n % i == 0) {
      n /= i;
      res.back().second++;
    }
  }
  if (n != 1) res.emplace_back(n, 1);
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (int)(0); i < (int)(n); i++) cin >> a[i];
  int GCD = gcd(a);
  if (GCD != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<pair<long long, int>> res;
  for (int i = (int)(0); i < (int)(n); i++) {
    int S = int(st.size());
    res = factorize(a[i]);
    if (cnt > 0) {
      int T = int(st.size());
      if (cnt != T - S) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
