#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));
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (int)(N); ++i) cin >> A[i];
  long long p = 1;
  for (int i = 0; i < (int)(N); ++i) p *= A[i];
  if (p == lcm<long long>(A))
    cout << "pairwise coprime" << endl;
  else if (gcd<long long>(A) == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
