#include <bits/stdc++.h>
using namespace std;
long long INF = (1LL << 60);
long long mod = 1000000007;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
struct Sieve {
  long long n;
  vector<long long> f, primes;
  Sieve(long long n = 1) : n(n), f(n + 1) {
    f[0] = f[1] = -1;
    for (long long i = 2; i <= n; ++i) {
      if (f[i]) continue;
      primes.push_back(i);
      f[i] = i;
      for (long long j = i * i; j <= n; j += i) {
        if (!f[j]) f[j] = i;
      }
    }
  }
  bool isPrime(long long x) { return f[x] == x; }
  vector<long long> factorList(long long x) {
    vector<long long> res;
    while (x != 1) {
      res.push_back(f[x]);
      x /= f[x];
    }
    return res;
  }
  vector<pair<long long, long long> > factor(long long x) {
    vector<long long> fl = factorList(x);
    if (fl.size() == 0) return {};
    vector<pair<long long, long long> > res(
        1, pair<long long, long long>(fl[0], 0));
    for (long long p : fl) {
      if (res.back().first == p) {
        res.back().second++;
      } else {
        res.emplace_back(p, 1);
      }
    }
    return res;
  }
};
bool tmp[1000010];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long n;
  cin >> n;
  Sieve s(1000010);
  vector<long long> a(n);
  for (long long i = 0; i < (n); i++) cin >> a[i];
  for (long long i = 0; i < (n); i++) tmp[a[i]] = true;
  bool ok = true;
  for (auto i : s.primes) {
    long long cnt = 0;
    for (long long j = i; j <= 1000010; j += i) {
      if (tmp[j]) {
        cnt++;
      }
    }
    if (cnt > 1) {
      ok = false;
      break;
    }
  }
  bool ok2 = true;
  long long now = 0;
  for (long long i = 0; i < (n); i++) {
    now = gcd(now, a[i]);
  }
  if (now != 1) ok2 = false;
  if (ok) {
    cout << "pairwise coprime" << endl;
  } else if (ok2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
