#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const int MAX = 1e6;
vector<bool> isPrime(MAX + 1, true);
vector<ll> prime;
ll gcd(ll x, ll y) {
  if (x < y) return gcd(y, x);
  while (y) {
    ll r = x % y;
    x = y;
    y = r;
  }
  return x;
}
void eratos(ll n) {
  isPrime[0] = isPrime[1] = false;
  for (ll i = 2; i * i <= n; i++) {
    if (isPrime[i]) {
      prime.push_back(i);
      ll j = i + i;
      while (j <= n) {
        isPrime[j] = false;
        j += i;
      }
    }
  }
}
int main() {
  ll n;
  cin >> n;
  eratos(1000);
  vector<int> cnt(MAX + 1), justcnt(MAX + 1);
  for (int i = 0; i < n; i++) {
    ll a;
    cin >> a;
    justcnt[a]++;
    for (auto p : prime) {
      if (a % p == 0) {
        cnt[p]++;
      }
    }
  }
  bool nc = false;
  bool sc = false;
  for (auto c : cnt) {
    if (c >= 2) {
      sc = true;
      if (c == n) {
        nc = true;
      }
    }
  }
  for (int i = 1001; i <= MAX; i++) {
    if (justcnt[i] >= 2) {
      sc = true;
      if (justcnt[i] == n) {
        nc = true;
      }
    }
  }
  if (nc) {
    cout << "not coprime\n";
  } else if (sc) {
    cout << "setwise coprime\n";
  } else {
    cout << "pairwise coprime\n";
  }
  return 0;
}
