#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = (ll)1e18 + 1;
const ll DIV = 1000000007;
template <typename T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
bool isPrime(ll x) {
  if (x < 2)
    return false;
  else if (x == 2)
    return true;
  if (x % 2 == 0) return false;
  for (ll i = 3; i * i <= x; i += 2)
    if (x % i == 0) return false;
  return true;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long N;
  cin >> N;
  vector<ll> A(N);
  for (size_t i = 0; i < N; i++) {
    cin >> A[i];
  }
  bool pairwise = true;
  vector<ll> notone;
  for (size_t i = 0; i < N - 1; i++) {
    for (size_t j = i + 1; j < N; j++) {
      ll codiv = gcd(A[i], A[j]);
      if (codiv != 1) {
        notone.push_back(codiv);
        pairwise = false;
      }
    }
  }
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else {
    bool setwise = false;
    ll prev_prime = -1;
    cerr << notone.size() << endl;
    for (size_t i = 0; i < notone.size(); i++) {
      if (isPrime(notone[i])) {
        if (prev_prime != -1) {
          if (prev_prime != notone[i]) {
            setwise = true;
          }
        }
        prev_prime = notone[i];
      }
    }
    if (setwise)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
