#include <bits/stdc++.h>
using namespace std;
int Exp(long long int exp_n, long long int exp_e, long long exp_mod);
vector<int> Eratosthenes(const int N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  int N, M, Min = 1000001;
  string S = "pairwise coprime";
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    M = max(M, A[i]);
    Min = min(Min, A[i]);
  }
  int c;
  for (const auto &i : Eratosthenes(Min)) {
    c = 0;
    for (int j = 0; j < N; j++) {
      if (A[j] % i == 0) {
        if (c != j & c > 0) {
          S = "setwise coprime";
          break;
        }
        c++;
      }
    }
    if (c == N) {
      cout << "not coprime" << endl;
      exit(0);
    }
  }
  c = 0;
  for (int i = 0; i < N; i++) {
    if (A[i] % Min == 0) {
      if (c != i & c > 0) {
        S = "setwise coprime";
        break;
      }
      c++;
    }
  }
  if (c == N) {
    S = "not coprime";
  }
  cout << S << endl;
}
int Exp(long long int exp_n, long long int exp_e, long long int exp_mod) {
  long long int exp_o = 1;
  long long int exp_x = exp_n;
  long long int exp_tmp;
  while (0 < exp_e) {
    exp_tmp = exp_e / 2;
    if (exp_e - exp_tmp * 2 == 1) {
      exp_o = exp_o * exp_x;
      if (exp_o > exp_mod) {
        exp_o = exp_o % exp_mod;
      }
    }
    exp_x = exp_x * exp_x;
    if (exp_x > exp_mod) {
      exp_x = exp_x % exp_mod;
    }
    exp_e = exp_tmp;
  }
  return exp_o;
}
