#include <bits/stdc++.h>
using namespace std;
long long Euclidean(long long A, long long B) {
  long long C = 0;
  if (A == B) return A;
  if (A > B) {
    C = A % B;
    if (C == 0)
      return B;
    else
      return Euclidean(B, C);
  } else {
    C = B % A;
    if (C == 0)
      return B;
    else
      return Euclidean(A, C);
  }
}
int main() {
  int N;
  cin >> N;
  long long A[N];
  long long in[100001];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < 100001; i++) {
    in[i] = 0;
  }
  long long gcd = A[0];
  bool pc = true;
  for (int i = 1; i < N; i++) {
    gcd = Euclidean(gcd, A[i]);
    long long 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;
        break;
      }
      in[tmp]++;
    }
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (gcd == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
