#include <bits/stdc++.h>
using namespace std;
void factorization(vector<pair<long long, long long> >& llp, long long n) {
  if (n <= 1) return;
  long long n2 = n;
  for (long long i = 2; i * i <= n; i++) {
    int count = 0;
    while (n2 % i == 0) {
      n2 = n2 / i;
      count++;
    }
    if (count > 0) {
      pair<long long, long long> temp;
      temp.first = i;
      temp.second = count;
      llp.push_back(temp);
    }
  }
  if (n2 > 1) {
    pair<long long, long long> temp;
    temp.first = n2;
    temp.second = 1;
    llp.push_back(temp);
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  map<long long, int> factor;
  for (int i = 0; i < (N); ++i) {
    if (A[i] == 1) continue;
    vector<pair<long long, long long> > llp;
    factorization(llp, A[i]);
    for (int j = 0; j < (llp.size()); ++j) {
      if (factor.find(llp[j].first) == factor.end()) {
        factor.emplace(llp[j].first, 1);
      } else {
        factor[llp[j].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;
}
