#include <bits/stdc++.h>
using namespace std;
vector<bool> P;
map<long long int, long long int> M;
void prime_factor(long long int N) {
  bool C = 1;
  while (C) {
    C = 0;
    for (long long int i = 2; i < sqrt(N); i++) {
      if (N % i == 0) {
        M[i]++;
        N /= i;
        C = 1;
        break;
      }
    }
  }
  M[N]++;
}
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, bool> m;
  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 a = A[i];
    prime_factor(a);
    for (auto x : M) {
      if (!m[x.first])
        m[x.first] = 1;
      else {
        C = 1;
        break;
      }
    }
    M.clear();
    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";
  }
}
