#include <bits/stdc++.h>
using namespace std;
namespace SieveLP {
int lp[1000000 + 1];
vector<int> primes;
void sieve() {
  for (int i = 2; i <= 1000000; ++i) {
    if (lp[i] == 0) {
      lp[i] = i;
      primes.push_back(i);
    }
    for (int j = 0; j < int(primes.size()) && primes[j] <= lp[i]; ++j) {
      long long xj = i * 1LL * primes[j];
      if (xj > 1000000) break;
      lp[xj] = primes[j];
    }
  }
}
vector<int> factorize(int n) {
  vector<int> res;
  while (n > 1) {
    int p = lp[n];
    if (res.empty() || res.back() != p) res.push_back(p);
    n /= p;
  }
  return res;
}
}  // namespace SieveLP
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  SieveLP::sieve();
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0, _n = (N); i < _n; ++i) cin >> A[i];
  vector<int> freq(1000000 + 1);
  for (int i = 0, _n = (N); i < _n; ++i) {
    vector<int> pf = SieveLP::factorize(A[i]);
    for (int p : pf) ++freq[p];
  }
  bool pairwise_coprime = true;
  for (int p = (2), _b = (1000000); p <= _b; ++p) {
    if (freq[p] == N) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (freq[p] > 1) {
      pairwise_coprime = false;
    }
  }
  if (pairwise_coprime)
    cout << "pairwise_coprime" << endl;
  else
    cout << "setwise comprime" << endl;
  return 0;
}
