#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, m, 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);
  bool dp[a[n] + 1];
  k = a[n];
  memset(dp, 1, sizeof(dp));
  for (i = 1; i < n; i++) {
    if (a[i] == 1) continue;
    if (dp[a[i]]) {
      for (j = 2 * a[i]; j <= k; j += a[i]) {
        dp[j] = 0;
      }
    }
  }
  for (i = 1; i <= n; i++) {
    if (dp[a[i]] == 0) break;
  }
  if (i > n)
    cout << "pairwise coprime";
  else {
    l = a[i];
    for (i = 2; i <= n; i++) {
      l = gcd(l, a[i]);
    }
    if (l == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
}
