#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
void prime_factorize(int n, set<int> &prime) {
  if (n <= 1) return;
  int l = sqrt(n);
  for (int i = 2; i <= l; i++) {
    if (n % i == 0) {
      prime_factorize(i, prime);
      prime_factorize(int(n / i), prime);
      return;
    }
  }
  prime.insert(n);
  return;
}
int main() {
  int n, a;
  cin >> n;
  vector<int> p(1e6 + 1);
  int ans = 0;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a;
    set<int> pr;
    prime_factorize(a, pr);
    for (auto x : pr) {
      p.at(x)++;
    }
  }
  for (int i = 2; i < 1e6 + 1; i++) {
    ans = max(ans, p.at(i));
  }
  if (ans == 1)
    cout << "pairwise coprime" << endl;
  else if (ans < n)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
