#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int64_t gcd(int64_t a, int64_t b) { return b ? gcd(b, a % b) : a; }
template <class T>
inline void vecout(vector<T> v) {
  for (int i = 0; i < v.size(); i++) {
    cout << v.at(i) << ' ';
  }
  cout << endl;
}
struct Sieve {
  int n;
  vector<int> p;
  Sieve(int n = 1) : n(n), p(n + 1) {
    p.at(0) = 0, p.at(1) = 0;
    for (int64_t i = 2; i * i <= n; i++) {
      if (!p.at(i)) {
        p.at(i) = i;
        for (int64_t j = i * i; j <= n; j += i) {
          if (!p.at(j)) p.at(j) = i;
        }
      }
    }
  }
  bool isPrime(int x) { return p.at(x) == x; }
  vector<int> factorList(int x) {
    vector<int> v;
    while (x != 1) {
      v.push_back(p.at(x));
      x /= p.at(x);
    }
    return v;
  }
  vector<int> factor(int x) {
    vector<int> v;
    while (x != 1) {
      int t = p.at(x);
      v.push_back(t);
      while (x % t == 0) x /= t;
    }
    return v;
  }
};
int main() {
  int N;
  cin >> N;
  vector<int> v(N);
  for (int i = 0; i < N; i++) {
    cin >> v.at(i);
  }
  int a = 0, b = 0, c = v.at(0), x, y, z;
  Sieve S(1000000);
  set<int> P;
  bool f = true;
  for (int i = 0; i < N; i++) {
    x = v.at(i);
    for (int j : S.factor(x)) {
      if (P.count(j)) {
        f = false;
        break;
      }
      P.insert(j);
    }
    if (!f) break;
  }
  if (f) {
    std::cout << "pairwise coprime" << '\n';
    return 0;
  }
  for (int i = 1; i < N; i++) {
    c = gcd(c, v.at(i));
    if (c == 1) {
      std::cout << "setwise coprime" << '\n';
      return 0;
    }
  }
  std::cout << "not coprime" << '\n';
}
