#include <bits/stdc++.h>
using namespace std;
long long maxl(long long a, long long b) { return ((a < b) ? b : a); }
long long minl(long long a, long long b) { return ((a > b) ? b : a); }
long long gcd(long long A, long long B) {
  if (B == 0) return A;
  return gcd(B, A % B);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long run_prod = 1;
  long long LCM = 1;
  bool ans = true;
  for (int i = 0; i < n; i++) {
    run_prod *= arr[i];
    LCM = (LCM * arr[i]) / (gcd(LCM, arr[i]));
    if (run_prod != LCM) {
      ans = false;
      break;
    }
  }
  if (ans) {
    cout << "pairwise coprime\n";
  } else {
    ans = false;
    long long GCD = arr[0];
    for (int i = 1; i < n; i++) {
      GCD = gcd(maxl(GCD, arr[i]), minl(GCD, arr[i]));
    }
    if (GCD == 1) {
      ans = true;
    }
    if (ans) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  }
}
