#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll INF = 1e18;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
vector<ll> prime;
bool is_prime[ll(1e3) + 1];
int sieve(int n) {
  int p = 0;
  for (int i = 0; i <= n; i++) is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      for (int j = 2 * i; j <= n; j += i) is_prime[j] = false;
    }
  }
  return p;
}
int main(void) {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  bool sc = false;
  bool nc = false;
  sort((A).begin(), (A).end());
  A.erase(unique((A).begin(), (A).end()), A.end());
  if (N != A.size()) sc = true;
  N = A.size();
  prime = vector<ll>();
  sieve(1e3);
  vector<ll> prime_count(prime.size());
  for (ll i = 0; i < N; i++) {
    for (size_t j = 0; j < prime.size(); j++) {
      if (A[i] % prime[j] == 0) {
        prime_count[j]++;
        while (A[i] % prime[j] == 0) {
          A[i] /= prime[j];
        }
      }
    }
  }
  for (size_t i = 0; i < prime_count.size(); i++) {
    if (prime_count[i] == N)
      nc = true;
    else if (prime_count[i] > 1)
      sc = true;
  }
  if (nc) {
    cout << "not coprime" << endl;
  } else if (sc) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
