#include <bits/stdc++.h>
using namespace std;
random_device rnd;
mt19937 mt(rnd());
using ll = long long;
using lld = long double;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<ll>;
using VVL = vector<VL>;
using PII = pair<int, int>;
const int IINF = 1 << 30;
const ll INF = 1ll << 60;
ll gcd(ll a, ll b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
int main() {
  int mx = 2000001;
  VL isPrime(mx, true);
  isPrime[0] = false;
  isPrime[1] = false;
  for (int i = (0); i < (mx); ++i) {
    if (isPrime[i] == false) continue;
    for (int j = 2 * i; j < mx; j += i) {
      isPrime[j] = false;
    }
  }
  VL primes;
  for (int i = (0); i < (mx); ++i) {
    if (isPrime[i]) {
      primes.push_back(i);
    }
  }
  int n;
  cin >> n;
  VL v(n);
  bool f1 = true;
  VL fact(1000000 + 5, 0);
  for (int i = (0); i < (n); ++i) {
    cin >> v[i];
  }
  ll sgcd = v[0];
  for (int i = (0); i < (n); ++i) {
    sgcd = gcd(sgcd, v[i]);
    ll x = v[i];
    ll cur = 0;
    while (x != 1) {
      if (x % primes[cur] == 0) {
        while (x % primes[cur] == 0) {
          x /= primes[cur];
        }
        fact[primes[cur]]++;
      }
      cur++;
    }
    if (isPrime[x]) {
      fact[x]++;
    }
  }
  for (int i = (0); i < (1000000 + 5); ++i) {
    f1 &= (fact[i] <= 1);
  }
  bool f2 = sgcd == 1;
  if (f1) {
    cout << "pairwise coprime" << endl;
  } else if (f2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
