#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
const long long MOD = 17;
long long _gcd(long long a, long long b) {
  if (b == 0) return a;
  return _gcd(b, a % b);
}
long long gcd(long long a, long long b) {
  a = abs(a), b = abs(b);
  if (a < b) swap(a, b);
  return _gcd(a, b);
}
long long qpow(long long a, long long n) {
  long long rt = 1;
  while (n) {
    if (n & 1) rt = (rt * a) % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return rt;
}
long long factor[MAXN];
void cal_factor() {
  factor[0] = 1;
  for (int u = 1; u < MAXN; u++) {
    factor[u] = (factor[u - 1] * u) % MOD;
  }
}
long long C(long long n, long long k) {
  return factor[n] * qpow(factor[n - k], MOD - 2) % MOD *
         qpow(factor[k], MOD - 2) % MOD;
}
bool notprime[MAXN];
vector<int> get_prime() {
  vector<int> primes;
  notprime[0] = notprime[1] = true;
  for (int u = 2; u < MAXN; u++) {
    if (notprime[u]) continue;
    for (int v = u + u; v < MAXN; v += u) {
      notprime[v] = true;
    }
  }
  for (int u = 2; u < MAXN; u++) {
    if (!notprime[u]) primes.push_back(u);
  }
  return primes;
}
void solve() {
  int n;
  cin >> n;
  unordered_map<int, int> cnt;
  for (int u = 0; u < n; u++) {
    int a;
    cin >> a;
    for (int p = 2; p * p <= a; p++) {
      bool has = false;
      while (a % p == 0) {
        a /= p;
        has = true;
      }
      if (has) cnt[p]++;
    }
    if (a > 1) cnt[a]++;
  }
  int pmax = 0;
  for (auto p : cnt) {
    pmax = max(pmax, p.second);
  }
  if (pmax == 1)
    cout << "pairwise coprime\n";
  else if (pmax != n)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int main() { solve(); }
