#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) return b;
  return gcd(b, (a % b));
}
vector<int> check(1000010);
bool div(int k) {
  bool res = false;
  if (check.at(k)) res = true;
  for (int i = 1; i * i <= k; i++) {
    if (k % i) continue;
    int a = i, b = k / i;
    if (a != 1) {
      for (int j = a; j < 1000001; j += a) check.at(j) = 1;
    }
    for (int j = b; j < 1000001; j += b) check.at(j) = 1;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  sort(a.begin(), a.end());
  bool ok = true;
  for (int i = 0; i < n; i++) {
    if (div(a.at(i))) ok = false;
    if (!ok) break;
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int k = a.at(0);
  for (int i = 0; i < n; i++) {
    k = gcd(k, a.at(i));
  }
  if (k == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
