#include <bits/stdc++.h>
using namespace std;
long long find_gcd(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0) {
    return a;
  }
  return find_gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long overall_gcd;
  for (int i = 0; i < n; i++) {
    overall_gcd = find_gcd(overall_gcd, arr[i]);
  }
  long long suffix_mul[n];
  suffix_mul[n - 1] = arr[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    suffix_mul[i] = suffix_mul[i + 1] * arr[i];
  }
  bool is_pairwise = true;
  for (int i = 0; i < n; i++) {
    if (i != n - 1) {
      if (find_gcd(arr[i], suffix_mul[i + 1]) > 1) {
        is_pairwise = false;
        break;
      }
    }
  }
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (overall_gcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
