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