#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = mod * mod;
const long double eps = 1e-12;
const long double pi = acos(-1.0);
long long qp(long long a, long long b, int mo) {
  int ans = 1;
  do {
    if (b & 1) ans = 1ll * ans * a % mo;
    a = 1ll * a * a % mo;
  } while (b >>= 1);
  return ans;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
template <typename T>
istream &operator>>(istream &is, vector<T> &vector<long long>) {
  for (auto &v : vector<long long>) is >> v;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vector<long long>) {
  os << "[";
  for (auto v : vector<long long>) os << v << ",";
  os << "]";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const deque<T> &vector<long long>) {
  os << "deq[";
  for (auto v : vector<long long>) os << v << ",";
  os << "]";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const unordered_set<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const multiset<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os,
                    const unordered_multiset<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &pa) {
  os << "(" << pa.first << "," << pa.second << ")";
  return os;
}
template <typename TK, typename TV>
ostream &operator<<(ostream &os, const map<TK, TV> &mp) {
  os << "{";
  for (auto v : mp) os << v.first << "=>" << v.second << ",";
  os << "}";
  return os;
}
template <typename TK, typename TV>
ostream &operator<<(ostream &os, const unordered_map<TK, TV> &mp) {
  os << "{";
  for (auto v : mp) os << v.first << "=>" << v.second << ",";
  os << "}";
  return os;
}
template <typename T>
void ndarray(vector<T> &vector<long long>, int len) {
  vector<long long>.resize(len);
}
template <typename T, typename... Args>
void ndarray(vector<T> &vector<long long>, int len, Args... args) {
  vector<long long>.resize(len);
  for (auto &v : vector<long long>) ndarray(v, args...);
}
template <typename T>
bool chmax(T &m, const T q) {
  if (m < q) {
    m = q;
    return true;
  } else
    return false;
}
template <typename T>
bool chmin(T &m, const T q) {
  if (q < m) {
    m = q;
    return true;
  } else
    return false;
}
template <typename T1, typename T2>
pair<T1, T2> operator+(const pair<T1, T2> &l, const pair<T1, T2> &r) {
  return make_pair(l.first + r.first, l.second + r.second);
}
template <typename T1, typename T2>
pair<T1, T2> operator-(const pair<T1, T2> &l, const pair<T1, T2> &r) {
  return make_pair(l.first - r.first, l.second - r.second);
}
template <typename T1, typename T2>
pair<T1, T2> operator<(const pair<T1, T2> l, const pair<T1, T2> r) {
  return (l.first < r.first);
}
template <typename T1, typename T2>
pair<T1, T2> operator>(const pair<T1, T2> l, const pair<T1, T2> r) {
  return (l.first > r.first);
}
unordered_map<int, int> prime_min_div(int n) {
  int prime[n];
  bool is_prime[n + 1];
  int p = 0;
  unordered_map<int, int> res;
  res[0] = res[1] = 1;
  for (int i = 0; i <= n; i++) is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i]) {
      prime[p++] = i;
      res[i] = i;
      for (int j = 2 * i; j <= n; j += i) {
        is_prime[j] = false;
        res[j] = i;
      }
    }
  }
  return res;
}
unordered_map<int, int> prime_factor(int n, unordered_map<int, int> m) {
  unordered_map<int, int> res;
  int now = n;
  while (now > 1) {
    int t = m[now];
    res[t]++;
    now /= t;
  }
  return res;
}
void solve() {
  int N;
  cin >> N;
  vector<int> A(N);
  cin >> A;
  sort((A).begin(), (A).end());
  int_fast32_t all_gcd = A[0];
  for (int i = 1; i <= N - 1; i++) {
    all_gcd = gcd(all_gcd, A[i]);
  }
  if (all_gcd > 1) {
    cout << "not coprime" << endl;
    return;
  }
  unordered_map<int, int> factor = prime_min_div(1000001);
  map<int, int> ch;
  bool ispair = true;
  for (int i = 0; i < N; i++) {
    int num = A[i];
    unordered_map<int, int> fa = prime_factor(num, factor);
    for (auto f : fa) {
      ch[f.first]++;
      if (ch[f.first] > 1) ispair = false;
    }
    if (!ispair) break;
  }
  if (ispair) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  std::cout << fixed << setprecision(10);
  solve();
  return 0;
}
