#include <bits/stdc++.h>
using namespace std;
long long my_gcd(long long n, long long m) {
  if (n < m) swap(n, m);
  if (m == 0) return n;
  return my_gcd(m, n % m);
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long maxa = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    maxa = (maxa < a[i]) ? a[i] : maxa;
  }
  vector<long long> primes;
  vector<long long> min_prime_factor(maxa + 1, 0);
  primes.push_back(2);
  for (long long j = 2; j <= maxa; j += 2) {
    min_prime_factor[j] = 2;
  }
  long long i;
  for (i = 3; i * i <= maxa; i += 2) {
    if (!min_prime_factor[i]) continue;
    primes.push_back(i);
    for (long long j = 2 * i; j <= maxa; j += i) {
      if (min_prime_factor[j] == 0) {
        min_prime_factor[j] = i;
      }
    }
  }
  for (; i <= maxa; i += 2) {
    if (min_prime_factor[i] == 0) {
      primes.push_back(i);
      min_prime_factor[i] = i;
    }
  }
  long long ggcd = a[0];
  for (long long i = 1; i < n; i++) {
    ggcd = my_gcd(a[i], ggcd);
    if (ggcd == 1) break;
  }
  if (ggcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  map<long long, long long> mp_prime;
  for (long long j = 0; j < primes.size(); j++) {
    mp_prime[primes[j]] = j;
  }
  vector<bool> c(primes.size(), false);
  for (long long i = 0; i < n; i++) {
    while (a[i] != 1) {
      long long p = min_prime_factor[a[i]];
      if (c[mp_prime[p]] != false) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      c[mp_prime[p]] = true;
      a[i] /= p;
      while (a[i] % p == 0) a[i] /= p;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
