#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);
  long long m = 0, idx = -1;
  for (auto &x : A) {
    cin >> x;
  }
  sort((A).rbegin(), (A).rend());
  m = A[0];
  for (long long i = (0), i_len = (N); i < i_len; ++i) {
    m = gcd(m, A[i]);
    if (m == 1) {
      idx = i;
    }
  }
  if (m != 1) {
    cout << "not coprime\n";
    return;
  }
  if (idx >= 0) {
    for (long long i = (0), i_len = (N); i < i_len; ++i) {
      if (i != idx) {
        long long t = gcd(A[idx], A[i]);
        if (t != 1) {
          cout << "setwise coprime\n";
          return;
        }
      }
    }
  }
  cout << "pairwise coprime\n";
}
signed main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  solve();
}
