#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int32_t main() {
  long long t, n, i, j, k, l = 0, max1 = 0;
  cin >> n;
  long long a[n + 1];
  for (i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  k = a[n];
  map<long long, long long> m;
  for (i = 1; i <= n; i++) m[a[i]]++;
  bool hi = true;
  for (i = 2; i <= k; i++) {
    l = 0;
    for (j = i; j <= k; j += i) {
      if (m.count(j)) l += m[j];
    }
    if (l > 1) {
      hi = false;
      break;
    }
  }
  if (hi)
    cout << "pairwise coprime";
  else {
    l = a[1];
    for (i = 2; i <= n; i++) {
      l = gcd(l, a[i]);
    }
    if (l == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
}
