#include <bits/stdc++.h>
using namespace std;
long long int GCD(long long int num1, long long int num2) {
  if (num2 == 0) return num1;
  return GCD(num2, num1 % num2);
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> ar;
  long long int k;
  for (long long int i = 0; i < n; i++) {
    cin >> k;
    ar.push_back(k);
  }
  bool check_pairwise = true, setwise = true;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = i + 1; j < n; j++) {
      if (GCD(ar[i], ar[j]) != 1) {
        check_pairwise = false;
      }
    }
  }
  long long int first = ar[0];
  for (long long int i = 1; i < n; i++) {
    first = GCD(ar[i], first);
  }
  if (first == 1 && check_pairwise == false) {
    cout << "setwise coprime" << endl;
  } else if (check_pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
