#include <bits/stdc++.h>
using namespace std;
long long N;
vector<long long> A;
vector<long long> P;
long long used[1000001];
vector<long long> Eratosthenes(const long long N) {
  vector<bool> is_prime(N + 1);
  for (long long i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<long long> P;
  for (long long i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (long long j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
long long gcd(long long a, long long b) {
  long long c;
  if (b > a) swap(a, b);
  while (b != 0) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  bool f1 = true;
  bool f2 = false;
  cin >> N;
  A.resize(N);
  P = Eratosthenes(1000000);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (A[i] < 2) {
      continue;
      f2 = true;
    }
    long long ra = sqrt(A[i]) + 1;
    for (int j = 0; P[j] < ra; j++) {
      if (P[i] > A[i]) {
        break;
      }
      if (A[i] % P[j] == 0) {
        if (used[P[j]] == 1) {
          f1 = false;
          break;
        } else
          used[P[j]] = 1;
      }
    }
  }
  long long pgcd = A[0];
  for (int i = 1; i < N; i++) {
    pgcd = gcd(pgcd, A[i]);
  }
  if (f1) {
    cout << "pairwise coprime" << endl;
  } else if (pgcd == 1 || f2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
