#include <bits/stdc++.h>
using namespace std;
long long m_pow(long long a, long long b, long long M = 1000000007) {
  long long res = 1;
  for (; b; b >>= 1, a = (a * a) % M)
    if (b & 1) res = (res * a) % M;
  return res;
}
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  for (; b; a %= b, swap(a, b))
    ;
  return a;
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); };
double dis(pair<int, int> a, pair<int, int> b) {
  return sqrt((a.first - b.first) * (a.first - b.first) +
              (a.second - b.second) * (a.second - b.second));
}
int dr[] = {0, 1, 0, -1, 1, 1, -1, -1};
int dc[] = {1, 0, -1, 0, 1, -1, 1, -1};
int n, m, k, t;
string ansok[2] = {"NO", "YES"};
int a[1000005];
int main() {
  ios::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  bool ok = 1;
  set<int> st;
  for (int i = 0; i < n; i++) {
    bool flg = 0;
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        flg = 1;
        if (st.count(j)) {
          ok = 0;
          break;
        }
        st.insert(j);
      }
    }
    if (!flg) {
      if (st.count(a[i])) {
        ok = 0;
        break;
      }
      st.insert(a[i]);
    }
    if (!ok) break;
  }
  if (ok) {
    cout << "pairwise coprime\n";
    return 0;
  }
  int g = a[0];
  for (int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
