#include <bits/stdc++.h>
using namespace std;
struct cww {
  cww() {
    ios::sync_with_stdio(false);
    cin.tie(0);
  }
} star;
std::vector<long long> Eratosthenes(const long long N) {
  std::vector<bool> is_prime(N + 1);
  for (long long i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<long long> P;
  for (long long i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (long long j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  long long n;
  cin >> n;
  long long data[n];
  long long max = 0;
  vector<long long> vec;
  for (long long i = 0; i < n; i++) {
    cin >> data[i];
    if (max < data[i]) max = data[i];
  }
  for (const auto& x : Eratosthenes((max + 2))) {
    vec.push_back(x);
  }
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long p = sqrt(data[i]) + 2;
    for (long long j = 0; j < vec.size(); j++) {
      if (vec[j] > p) break;
      if (data[i] % vec[j] == 0) mp[vec[j]]++;
    }
  }
  bool p = true;
  bool point = true;
  for (const auto& x : mp) {
    long long v = x.second;
    if (v >= 2) p = false;
    if (v == n) point = false;
  }
  if (p == true) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (point == true) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
