#include <bits/stdc++.h>
using namespace std;
vector<bool> P;
void F(long long int X) {
  P.resize(X + 1);
  for (long long int i = 2; i < X + 1; i++) P[i] = 1;
  long long int p = 2;
  while (p <= sqrt(X)) {
    long long int i = 2;
    while (p * i <= X) {
      P[p * i] = 0;
      i++;
    }
    p++;
  }
}
long long int gcd(long long int N, long long int M) {
  if (N % M == 0)
    return M;
  else
    return gcd(M, N % M);
}
int main() {
  long long int N;
  cin >> N;
  vector<long long int> A(N);
  vector<long long int> Prime;
  map<long long int, long long int> M;
  F(1000000);
  long long int L = P.size();
  for (long long int i = 0; i < L; i++) {
    if (P[i]) Prime.push_back(i);
  }
  bool C = 0, D = 1;
  for (long long int i = 0; i < N; i++) cin >> A[i];
  long long int G = A[0];
  for (long long int i = 0; i < N; i++) {
    long long int j = 0;
    while (Prime[j] <= sqrt(A[i])) {
      if (A[i] % Prime[j] == 0) {
        if (M[Prime[j]] == 0 && M[A[i] / Prime[j]] == 0) {
          M[Prime[j]]++;
          M[A[i] / Prime[j]]++;
          j++;
        } else {
          C = 1;
          break;
        }
      } else
        j++;
    }
    if (C) break;
  }
  for (long long int i = 0; i < N - 1; i++) {
    G = gcd(G, A[i + 1]);
    if (G == 1) {
      D = 0;
      break;
    }
  }
  if (!C)
    cout << "pairwise coprime";
  else {
    if (D)
      cout << "not coprime";
    else
      cout << "setwise coprime";
  }
}
