#include <bits/stdc++.h>
using namespace std;
long long GCD(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return GCD(b, a % b);
  }
}
int main() {
  int n;
  cin >> n;
  long long ref = 0;
  long long sum = 0;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ref = GCD(a[i], ref);
    sum += a[i];
  }
  int b = 0;
  for (int i = 0; i < n; i++) {
    sum -= a[i];
    if (GCD(a[i], sum) != 1) {
      b = 1;
    }
  }
  if (b == 0) {
    cout << "pairwise coprime" << endl;
  } else if (ref == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
