#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-12;
static const double PI = acos(-1.0);
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;
vector<bool> is_prime;
vector<bool> is_prime_small;
vector<long long> divisor(long long n) {
  vector<long long> res;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i) {
        res.push_back(n / i);
      }
    }
  }
  return res;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve(long long N, std::vector<long long> A) {
  is_prime.resize(0);
  for (int i = 0; i <= 1e6; i++) {
    is_prime.push_back(true);
  }
  is_prime[0] = is_prime[1] = false;
  auto v = divisor(A[0]);
  for (auto i : v) {
    if (is_prime[i]) {
      for (int j = i; j <= 1e6; j += i) {
        is_prime[j] = false;
      }
    }
  }
  long long count = 0;
  for (int j = (int)(1); j < (int)(N); j++) {
    if (is_prime[A[j]]) {
      auto v = divisor(A[0]);
      for (auto i : v) {
        if (is_prime[i]) {
          for (int j = i; j <= 1e6; j += i) {
            is_prime[j] = false;
          }
        }
      }
    } else {
      count++;
    }
  }
  if (count == 0) {
    cout << "pairwise coprime" << endl;
    return;
  }
  int x = A[0] / 0;
  for (int j = (int)(1); j < (int)(N); j++) {
    if (x > A[j]) {
      x = gcd(x, A[j]);
    } else {
      x = gcd(A[j], x);
    }
  }
  if (x == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
