#include <bits/stdc++.h>
using namespace std;
template <typename T = long long>
T gcd(T a, T b) {
  if (b == 0)
    return a;
  else
    return gcd<T>(b, a % b);
}
template <typename T = long long>
T gcd(std::vector<T>& a, int i = 0) {
  if (a.size() < 2) return 0;
  if (i == (int)a.size() - 2) return gcd<T>(a[i], a[i + 1]);
  return gcd<T>(a[i], gcd(a, i + 1));
}
template <typename T = long long>
T lcm(T a, T b) {
  return a * b / gcd<T>(a, b);
}
template <typename T = long long>
T lcm(std::vector<T>& a, int i = 0) {
  if (a.size() < 2) return 0;
  if (i == (int)a.size() - 2) return lcm<T>(a[i], a[i + 1]);
  return lcm(a[i], lcm<T>(a, i + 1));
}
void calculatePrimeByEratosthenes(int M, std::vector<long long>& prime) {
  std::vector<bool> isPrime(M + 1, true);
  isPrime[0] = isPrime[1] = false;
  for (int i = 2; i * i <= M; ++i) {
    if (isPrime[i]) {
      for (int j = 2; i * j <= M; ++j) isPrime[i * j] = false;
    }
  }
  for (int i = 2; i <= M; ++i) {
    if (isPrime[i]) prime.push_back(i);
  }
}
bool check(vector<long long> A, int N) {
  vector<long long> prime;
  calculatePrimeByEratosthenes(1e+6 + 1, prime);
  vector<bool> is_appeared(1e+6 + 1, false);
  for (int i = 0; i < (int)(N); ++i) {
    for (auto p : prime) {
      if (p * p > A[i]) {
        if (is_appeared[A[i]]) return false;
        is_appeared[A[i]] = true;
        break;
      }
      if (A[i] % p == 0) {
        if (is_appeared[p]) return false;
        is_appeared[p] = true;
        while (A[i] % p == 0) A[i] /= p;
      }
    }
  }
  return true;
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (int)(N); ++i) cin >> A[i];
  if (check(A, N))
    cout << "pairwise coprime" << endl;
  else if (gcd<long long>(A) == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
