#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
int main() {
  cout << fixed << setprecision(10);
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0, i_l = (n); i < i_l; i++) cin >> a[i];
  long long int u = a[n - 1];
  bool isPC = true;
  for (long long int i = n - 2; 0 <= i; i--) {
    if (gcd(u, a[i]) != 1) {
      isPC = false;
      break;
    }
    u = (u * a[i]) % 1000000007;
  }
  if (isPC == true) {
    cout << "pairwise coprime";
    return 0;
  }
  long long int t = a[1];
  for (int i = 0, i_l = (n); i < i_l; i++) {
    t = gcd(a[i], t);
  }
  if (t == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
