#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); 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::set<int> cumulative_factors = get_prime_factors(a[0]);
  std::set<int> current_factors;
  std::set<int> intersect;
  bool found_noncomp = false;
  int current_d = a[0];
  for (int i = 1; i < n; i++) {
    current_d = gcd(current_d, a[i]);
    if (!found_noncomp) {
      current_factors = get_prime_factors(a[i]);
      std::set<int> intersect;
      std::set_intersection(cumulative_factors.begin(),
                            cumulative_factors.end(), current_factors.begin(),
                            current_factors.end(),
                            std::inserter(intersect, intersect.begin()));
      if (intersect.size() > 0) {
        found_noncomp = true;
      } else {
        std::set<int> my_union;
        std::set_union(cumulative_factors.begin(), cumulative_factors.end(),
                       current_factors.begin(), current_factors.end(),
                       std::inserter(my_union, my_union.begin()));
        cumulative_factors = my_union;
      }
    }
  }
  if (current_d > 1) {
    printf("not coprime\n");
  } else {
    if (found_noncomp) {
      printf("setwise coprime\n");
    } else {
      printf("pairwise coprime\n");
    }
  }
}
