#include <bits/stdc++.h>
using namespace std;
int ch[1000001];
void pairwise(int arr[], int n) {
  int d, mx = 1;
  bool f = true;
  for (int j = 0; j < n; j++) {
    d = arr[j];
    if (arr[j] != 1) f = false;
    for (int i = 2; i * i <= (arr[j] * arr[j]); i++) {
      if (d % i == 0) {
        while (d % i == 0) {
          d /= i;
        }
        ch[i] += 1;
        mx = max(mx, ch[i]);
      }
    }
    if (d != 1) {
      ch[d] += 1;
      mx = max(mx, ch[d]);
    }
  }
  if (mx == 1 || f)
    cout << "pairwise coprime";
  else if (mx >= n)
    cout << "not coprime";
  else
    cout << "setwise coprime";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  pairwise(arr, n);
  return 0;
}
