#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
void factor(int number, map<int, int> &fact) {
  for (int i = 2; i * i <= number; i++) {
    if (number % i == 0) {
      if (i != number / i) {
        fact[i]++;
        fact[number / i]++;
      } else
        fact[i]++;
    }
  }
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int totalgcd = a[0];
  map<int, int> fact;
  factor(a[0], fact);
  for (int i = 1; i < n; i++) {
    totalgcd = gcd(totalgcd, a[i]);
    factor(a[i], fact);
  }
  int ispairwise = 1;
  for (auto itr : fact) {
    if (itr.second > 1) {
      ispairwise = 0;
      break;
    }
  }
  if (ispairwise) {
    cout << "pairwise coprime" << endl;
  } else if (totalgcd == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
