#include <bits/stdc++.h>
using namespace std;
int Euclidean(int A, int B) {
  int temp;
  int ma = max(A, B), mb = min(A, B);
  while (mb != 0) {
    temp = mb;
    mb = ma % mb;
    ma = temp;
  }
  return ma;
}
int main() {
  int N;
  cin >> N;
  int A[N];
  int IN[100001];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < 100001; i++) {
    IN[i] = 0;
  }
  int gcd = A[0];
  bool pc = true;
  int t = A[0];
  for (int j = 2; j * j <= A[0]; j++) {
    while (t % j == 0) {
      IN[j]++;
      t /= j;
    }
  }
  if (t != 1) {
    IN[t]++;
  }
  for (int i = 1; i < N; i++) {
    gcd = Euclidean(gcd, A[i]);
    int tmp = A[i];
    for (int j = 2; j * j <= A[i]; j++) {
      bool nnow = true;
      while (tmp % j == 0) {
        if (IN[j] > 0 && nnow) {
          pc = false;
          break;
        }
        IN[j]++;
        tmp /= j;
        nnow = false;
      }
    }
    if (tmp != 1) {
      if (IN[tmp] > 0) {
        pc = false;
      }
      IN[tmp]++;
    }
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (gcd == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
