#include <bits/stdc++.h>
using namespace std;
std::vector<bool> IsPrime;
void sieve(size_t max) {
  if (max + 1 > IsPrime.size()) {
    IsPrime.resize(max + 1, true);
  }
  IsPrime[0] = false;
  IsPrime[1] = false;
  for (size_t i = 2; i * i <= max; ++i)
    if (IsPrime[i])
      for (size_t j = 2; i * j <= max; ++j) IsPrime[i * j] = false;
}
map<int, int> factorization(int x) {
  map<int, int> pn;
  for (int i = 2; i * i <= x; i++) {
    while (x % i == 0) {
      x /= i;
      pn[i]++;
    }
  }
  if (x != 1) pn[x]++;
  return pn;
}
void Main() {
  int n;
  cin >> n;
  int M = 1000000;
  sieve(M);
  vector<long> sosu;
  for (int i = 2; i <= M; i++) {
    if (IsPrime[i]) sosu.push_back(i);
  }
  vector<int> sum(sosu.size());
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    for (int j = 0; j * j < sosu.size(); j++) {
      if (a % sosu[j] == 0) sum[j]++;
    }
    if (a % sosu[sosu.size() - 1] == 0) sum[sosu.size() - 1]++;
  }
  int maxsum = 0;
  for (int i = 0; i < sum.size(); i++) {
    maxsum = max(maxsum, sum[i]);
  }
  if (maxsum <= 1)
    cout << "pairwise coprime" << endl;
  else if (maxsum <= n - 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
int main(int argc, char **argv) {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  Main();
  return 0;
}
