#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const int MaxNum = 1000000;
vector<int> primes(MaxNum);
vector<bool> p_flags(MaxNum, false);
vector<bool> isPrime(MaxNum, false);
void initPrimes() {
  primes.resize(0);
  primes.push_back(1);
  for (int i = 0; i < (int)(MaxNum - 2); ++i) {
    auto n = i + 2;
    if (p_flags[n]) {
      continue;
    }
    primes.push_back(n);
    isPrime[n] = true;
    for (int j = n; j < MaxNum; j += n) {
      p_flags[j] = true;
    }
  }
}
int main(int, const char**) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); ++i) {
    cin >> a[i];
  }
  initPrimes();
  vector<int> useCount(MaxNum, 0);
  vector<bool> used(MaxNum, false);
  bool dup = false;
  for (int i = 0; i < (int)(n); ++i) {
    auto t = a[i];
    for (auto p : primes) {
      if (p * p > t) {
        break;
      }
      if (t % p == 0) {
        if (p != 1) {
          useCount[p]++;
          if (used[p]) {
            dup = true;
          }
          used[p] = true;
        }
        auto m = t / p;
        if (isPrime[m] && m != p) {
          useCount[m]++;
          if (used[m]) {
            dup = true;
          }
          used[m] = true;
        }
      }
    }
  }
  for (auto p : primes) {
    if (useCount[p] == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  if (dup) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
