#include <bits/stdc++.h>
using namespace 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<int> inp(n);
  for (long long(i) = 0; (i) < (long long)(n); ++(i)) cin >> inp[i];
  vector<int> prime;
  prime = Eratosthenes(1005);
  vector<int> ans(1000001, 0);
  for (long long(i) = 0; (i) < (long long)(n); ++(i)) {
    for (long long(j) = 0; (j) < (long long)(prime.size()); ++(j)) {
      int div = prime[j];
      if (div > sqrt(inp[i])) continue;
      if (inp[i] % div == 0) {
        ans[div]++;
        if (div != inp[i] / div) ans[inp[i] / div]++;
      }
    }
    if (1005 < ans[inp[i]]) ans[inp[i]]++;
  }
  bool flag = false;
  bool flag2 = false;
  for (long long(i) = 0; (i) < (long long)(1000001); ++(i)) {
    if (ans[i] > 1) flag = true;
    if (ans[i] == n) flag2 = true;
    if (ans[i] >= 1) {
    }
  }
  if (!flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (flag2) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
