#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int T;
int n, a[N];
int v[N], prime[N];
int m = 0;
void primes(int n) {
  memset(v, 0, sizeof(v));
  for (int i = 2; i <= n; i++) {
    if (v[i] == 0) {
      v[i] = i;
      prime[++m] = i;
    }
    for (int j = 1; j <= m; j++) {
      if (prime[j] > v[i] || prime[j] > n / i) break;
      v[i * prime[j]] = prime[j];
    }
  }
}
int cnt[N];
int main() {
  ios::sync_with_stdio(false);
  primes(1000000);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (prime[j] > a[i]) break;
      if (a[i] % prime[j] == 0) cnt[j]++;
    }
  }
  if (*max_element(cnt + 1, cnt + m + 1) == 1) {
    puts("pairwise coprime");
  } else if (n - 1 == *max_element(cnt + 1, cnt + m + 1)) {
    for (int i = 1; i <= m; i++)
      if (cnt[i] != n - 1 && cnt[i] > 0) {
        puts("not coprime");
        return 0;
      }
    puts("setwise coprime");
  } else
    puts("not coprime");
  return 0;
}
