#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long c, long long d) { return c / gcd(c, d) * d; }
void solve() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (auto &x : A) {
    cin >> x;
  }
  sort((A).begin(), (A).end());
  unordered_set<long long> st((A).begin(), (A).end());
  long long m = A[0];
  for (auto &x : A) {
    m = gcd(m, x);
  }
  if (m != 1) {
    cout << "not coprime\n";
    return;
  }
  vector<bool> b(A[N - 1] + 1, true);
  b[0] = b[1] = false;
  for (long long i = 2; i < (long long)b.size(); ++i) {
    if (b[i]) {
      long long cnt = 0;
      for (long long j = i * i; j < (long long)b.size(); j += i) {
        if (b[j] && st.count(j) > 0) {
          cnt++;
        }
        b[j] = false;
      }
      if (cnt >= 2) {
        cout << "setwise coprime\n";
        return;
      }
    }
  }
  cout << "pairwise coprime\n";
}
signed main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  solve();
}
