#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() {
  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 = max(maxa, a[i]);
  }
  vector<long long> primes;
  vector<bool> is_prime(maxa + 1, true);
  primes.push_back(2);
  for (long long j = 4; j <= maxa; j += 2) {
    is_prime[j] = false;
  }
  long long i;
  for (i = 3; i * i <= maxa; i += 2) {
    if (!is_prime[i]) continue;
    primes.push_back(i);
    for (long long j = 2 * i; j <= maxa; j += i) {
      is_prime[j] = false;
    }
  }
  for (; i <= maxa; i += 2) {
    if (is_prime[i]) {
      primes.push_back(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++) {
    for (long long j = 0; j < primes.size() && a[i] <= primes[j] * primes[j];
         j++) {
      if (a[i] % primes[j] == 0) {
        if (c[j] == true) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        c[j] = true;
        a[i] /= primes[j];
        while (a[i] % primes[j] == 0) {
          a[i] /= primes[j];
        }
      }
    }
    if (a[i] != 1) {
      long long jj = mp_prime[a[i]];
      if (c[jj] == true) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      c[jj] = true;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
