#include <bits/stdc++.h>
using namespace std;
bool isp[1010] = {false};
vector<long long int> primes;
inline void prime_init() {
  for (long long int i = (long long int)(2); i < ((long long int)(1010)); i++)
    isp[i] = true;
  for (long long int i = (long long int)(2);
       i < ((long long int)(sqrt(1010) + 2)); i++) {
    if (isp[i]) {
      for (long long int j = 2; i * j < 1010; j++) {
        isp[i * j] = false;
      }
    }
  }
  for (long long int i = 0; i < ((long long int)(1000)); i++)
    if (isp[i]) primes.push_back(i);
}
unordered_map<long long int, long long int> cnt;
int main() {
  prime_init();
  bool pcop = true;
  long long int mac = 0;
  long long int n;
  cin >> n;
  for (long long int i = 0; i < ((long long int)(n)); i++) {
    long long int a;
    cin >> a;
    unordered_set<long long int> now;
    for (auto p : primes) {
      while (a % p == 0) {
        now.insert(p);
        a /= p;
      }
    }
    if (a > 1) now.insert(a);
    for (auto&& v : now) {
      if (cnt.count(v) > 0) {
        pcop = false;
      }
      cnt[v]++;
      mac = max(cnt[v], mac);
    }
  }
  if (pcop) {
    puts("pairwise coprime");
  } else if (mac < n) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
