#include <bits/stdc++.h>
using namespace std;
class Factorization {
 private:
  vector<bool> isPrime;
  vector<int> prime;
  vector<int> divisor;

 public:
  Factorization(int n);
  map<int, int> getPrimeFactors(int k);
};
Factorization::Factorization(int n) {
  isPrime.assign(n + 1, true);
  isPrime[0] = false;
  isPrime[1] = false;
  divisor.assign(n + 1, -1);
  for (int i = 2; i <= n; i++) {
    if (!isPrime[i]) continue;
    divisor[i] = i;
    prime.push_back(i);
    for (int j = 2; i * j <= n; j++) {
      isPrime[i * j] = false;
      divisor[i * j] = i;
    }
  }
}
map<int, int> Factorization::getPrimeFactors(int k) {
  map<int, int> res;
  while (k >= 2) {
    int d = divisor[k];
    if (res.find(d) == res.end()) {
      res.emplace(d, 1);
    } else {
      res[d]++;
    }
    k /= d;
  }
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int max_A = 0;
  for (int i = 0; i < (N); ++i) {
    cin >> A[i];
    max_A = max(max_A, A[i]);
  }
  Factorization fact(max_A);
  map<long long, int> factor;
  for (int i = 0; i < (N); ++i) {
    if (A[i] == 1) continue;
    map<int, int> f = fact.getPrimeFactors(A[i]);
    for (auto p : f) {
      if (factor.find(p.first) == factor.end()) {
        factor.emplace(p.first, 1);
      } else {
        factor[p.first]++;
      }
    }
  }
  int maximum = 0;
  for (const auto& [key, value] : factor) {
    maximum = max(maximum, value);
  }
  if (maximum == 1)
    cout << "pairwise coprime" << endl;
  else if (maximum < N)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
