#include <bits/stdc++.h>
using namespace std;
vector<int> primes(int N) {
  vector<int> V;
  for (int i = 2; i <= N; i++) {
    if (N % i == 0) {
      V.push_back(i);
    }
  }
  return V;
}
int gcd(int a, int b) {
  int d = a;
  if (b == 0) {
    return d;
  }
  d = gcd(b, a % b);
  return d;
}
int gcds(vector<int> V) {
  int m = V[0];
  for (int i = 1; i < (int)V.size(); i++) {
    m = gcd(m, V[i]);
  }
  return m;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  string pc = "pairwise coprime";
  sort(A.begin(), A.end());
  vector<int> P = primes(sqrt(A[N - 1]));
  int C = 0;
  for (int i = 0; i < (int)P.size(); i++) {
    C = 0;
    for (int j = 0; j < N; j++) {
      if (A[j] % P[i]) {
        C++;
      }
    }
    if (C > 1) {
      pc = "setwise coprime";
      break;
    }
  }
  if (pc == "setwise coprime") {
    int m = gcds(A);
    if (m != 1) {
      pc = "not coprime";
    }
  }
  cout << pc << endl;
}
