#include <bits/stdc++.h>
using namespace std;
bitset<2000> bt;
vector<int> primes;
void getPrimes() {
  for (int i = 3; i < 2000; i++) bt[i] = true;
  primes.push_back(2);
  for (int i = 3; i < 2000; i += 2) {
    if (bt[i])
      for (int j = i * i; j < 2000; j += 2 * i) bt[j] = false;
  }
  for (int i = 3; i < 2000; i += 2) {
    if (bt[i]) primes.push_back(i);
  }
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int cnt[(int)1e6 + 5];
int main() {
  int n;
  cin >> n;
  vector<int> vt(n, 0);
  primes.reserve(2000);
  for (int i = 0; i < n; i++) cin >> vt[i];
  getPrimes();
  memset(cnt, 0, sizeof cnt);
  bool a, b;
  a = b = true;
  for (int i = 0; i < n; i++) {
    int val = vt[i];
    for (int j = 0; j < primes.size(); j++) {
      if (vt[i] < primes[j]) break;
      int ct = 0;
      while (val % primes[j] == 0) {
        val /= primes[j];
        ct++;
      }
      if (ct != 0) {
        cnt[primes[j]] += ct;
        if (ct != cnt[primes[j]]) {
          a = false;
          break;
        }
      }
    }
    if (!a) break;
  }
  if (!a) {
    int g = vt[0];
    for (int i = 1; i < n; i++) {
      g = gcd(g, vt[i]);
    }
    if (g != 1) b = false;
    if (b) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  } else {
    cout << "pairwise coprime\n";
  }
  return 0;
}
