#include <bits/stdc++.h>
using namespace std;
using P = pair<long long, long long>;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};
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;
}
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
map<long long, int> prime_factor(long long n) {
  map<long long, int> ret;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  long long x = A[0];
  for (int i = 0; i < N - 1; i++) {
    x = gcd(x, A[i + 1]);
  }
  if (x != 1) {
    cout << "not coprime" << endl;
  } else {
    set<long long> st;
    int flag = 0;
    for (int i = 0; i < N; i++) {
      for (auto p : prime_factor(A[i])) {
        if (st.count(p.first)) {
          flag = 1;
          break;
        }
        st.insert(p.first);
      }
    }
    if (flag == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "pairwise coprime" << endl;
    }
  }
}
