#include <bits/stdc++.h>
using namespace std;
struct cww {
  cww() {
    ios::sync_with_stdio(false);
    cin.tie(0);
  }
} star;
const long long INF = numeric_limits<long long>::max();
std::vector<int> Eratosthenes(const int N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> pair<long long, long long>;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      pair<long long, long long>.emplace_back(i);
    }
  }
  return pair<long long, long long>;
}
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  map<long long, long long> b;
  for (long long i = long long(0); i < long long(n); ++i) {
    cin >> a[i];
    ++b[a[i]];
  }
  vector<int> e = Eratosthenes(1000);
  bool f1 = true;
  bool f2 = true;
  for (const auto &x : e) {
    int c = 0;
    for (long long i = long long(0); i < long long(n); ++i) {
      if (a[i] % x == 0) ++c;
    }
    if (c > 1) f1 = false;
    if (c == n) f2 = false;
  }
  int d = 0;
  for (long long i = long long(0); i < long long(n); ++i) {
    if (b[a[i]] > 1) {
      f1 = false;
      f2 = false;
    }
  }
  if (f1)
    cout << "pairwise coprime" << endl;
  else if (f2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
