#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int pairwise = 1;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A[i], A[j]) != 1) {
        pairwise = 0;
        break;
      }
    }
    if (pairwise == 0) break;
  }
  if (pairwise == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int result = A[0];
  for (int i = 1; i < N; i++) {
    result = gcd(A[i], result);
  }
  if (result == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  } else
    cout << "not coprime" << endl;
}
