#include <bits/stdc++.h>
using namespace std;
int __gcd(int a, int b) {
  if (b == 0) return a;
  return __gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int cont = a[0];
  bool c = true;
  vector<bool> v(10e6 + 1, false);
  for (int i = 0; i < n; i++) {
    cont = __gcd(a[i], cont);
    for (int j = 2; j <= a[i] && c; j++) {
      if (a[i] % j == 0) {
        c = !v[j];
        v[j] = true;
      }
    }
  }
  if (c) {
    cout << "pairwise coprime\n";
  } else if (cont == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
