#include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1000000007;
const int64_t MODA = 998244353;
long long gcd(long long a, long long b) {
  int64_t gcdmax = max(a, b);
  int64_t gcdmin = min(a, b);
  while (true) {
    if (gcdmax % gcdmin == 0)
      break;
    else
      gcdmax %= gcdmin;
    swap(gcdmin, gcdmax);
  }
  return gcdmin;
}
int64_t powerup(int64_t N, int64_t P, int64_t M) {
  if (P == 0)
    return 1;
  else if (P % 2 == 0) {
    int64_t t = powerup(N, P / 2, M);
    return t * t % M;
  } else
    return N * powerup(N, P - 1, M) % M;
}
vector<int64_t> find_divisor(int64_t N) {
  int64_t k = 1;
  while (k * k <= N) {
    k++;
  }
  vector<int64_t> A(1);
  for (int64_t i = 0; i < (int64_t)(k); i++) {
    if (i == 1)
      A.at(0) = 1;
    else if (i >= 2) {
      if (N % i == 0) A.push_back(i);
    }
  }
  int64_t t = 0;
  t = A.size();
  for (int64_t i = 0; i < (int64_t)(t); i++) {
    if (A.at(t - i - 1) * A.at(t - i - 1) != N)
      A.push_back(N / A.at(t - 1 - i));
  }
  return A;
}
vector<int64_t> fac;
vector<int64_t> finv;
vector<int64_t> inv;
void COMinit(int64_t N, int64_t P) {
  for (int64_t i = 0; i < (int64_t)(N + 1); i++) {
    if (i == 0) {
      fac.push_back(1);
      finv.push_back(1);
      inv.push_back(1);
    } else if (i == 1) {
      fac.push_back(1);
      finv.push_back(1);
      inv.push_back(1);
    } else {
      fac.push_back(fac.at(i - 1) * i % P);
      inv.push_back(P - inv.at(P % i) * (P / i) % P);
      finv.push_back(finv.at(i - 1) * inv.at(i) % P);
    }
  }
}
int64_t COM(int64_t n, int64_t k, int64_t P) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac.at(n) * (finv.at(k) * finv.at(n - k) % P) % P;
}
int main() {
  int64_t N;
  cin >> N;
  vector<int64_t> A;
  vector<int64_t> B(1000010);
  for (int64_t i = 0; i < (int64_t)(N); i++) {
    int64_t K;
    cin >> K;
    if (K > 1) A.push_back(K);
  }
  int64_t L = A.size();
  if (L > 1) {
    int64_t G = A.at(0);
    for (int64_t i = 0; i < (int64_t)(N); i++) {
      G = gcd(G, A.at(i));
    }
    if (G == 1 && L < 90000) {
      bool TF = true;
      for (int64_t i = 0; i < (int64_t)(L); i++) {
        vector<int64_t> D = find_divisor(A.at(i));
        int64_t M = D.size();
        if (M > 1) {
          for (int64_t j = 1; j < M; j++) {
            B.at(D.at(j))++;
            if (B.at(D.at(j)) > 1) TF = false;
          }
        }
      }
      if (TF)
        cout << "pairwise coprime" << endl;
      else
        cout << "setwise coprime" << endl;
    } else if (G == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  } else
    cout << "pairwise coprime" << endl;
}
