#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int mi = std::min(a, b);
  int ma = std::max(a, b);
  if (mi == 0) {
    return ma;
  } else {
    return gcd(ma % mi, mi);
  }
}
std::set<int> get_prime_factors(int n) {
  std::set<int> result;
  while (n % 2 == 0) {
    n = n / 2;
    result.insert(2);
  }
  for (int i = 3; i <= sqrt(n) + 1; i = i + 2) {
    while (n % i == 0) {
      n = n / i;
      result.insert(i);
    }
  }
  if (n > 2) {
    result.insert(n);
  }
  return result;
}
int main() {
  int n = 0;
  long long base = 1e9 + 7;
  scanf("%d", &n);
  vector<int> a(n, 0);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  std::map<int, int> primes;
  for (int i = 0; i < n; i++) {
    std::set<int> current_factors = get_prime_factors(a[i]);
    for (std::set<int>::iterator it = current_factors.begin();
         it != current_factors.end(); ++it) {
      if (primes.find(*it) != primes.end()) {
        primes[*it] += 1;
      } else {
        primes[*it] = 1;
      }
    }
  }
  int max_number = 0;
  for (std::map<int, int>::iterator it = primes.begin(); it != primes.end();
       ++it) {
    max_number = std::max(it->second, max_number);
  }
  if (max_number == 1) {
    printf("pairwise coprime\n");
  } else {
    if (max_number < n) {
      printf("setwise coprime\n");
    } else {
      printf("not coprime\n");
    }
  }
}
