#include <bits/stdc++.h>
using namespace std;
const long long Maxn = 1e6 + 10;
long long a[Maxn];
bool vis[Maxn];
long long gcd(long long a, long long b) { return (!b) ? a : gcd(b, a % b); }
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  bool f = 0;
  for (long long i = 1; i <= n; i++) {
    long long limits = sqrt(a[i] + 0.5);
    if (f) break;
    for (long long j = 2; j <= limits; j++) {
      if (!(a[i] % j)) {
        if (vis[j] || vis[a[i] / j]) {
          f = 1;
          break;
        }
        vis[j] = vis[a[i] / j] = 1;
      }
    }
  }
  if (!f) {
    cout << "pairwise coprime";
    return 0;
  }
  long long now = a[1];
  for (long long i = 2; i <= n; i++) now = gcd(now, a[i]);
  if (now == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
  return 0;
}
