#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1001002003004005006ll;
const int INF = 1001001001;
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;
}
const int mod = 1000000007;
struct mint {
  long long x;
  mint() : x(0) {}
  mint(long long x) : x((x % mod + mod) % mod) {}
  mint& fix() {
    x = (x % mod + mod) % mod;
    return *this;
  }
  mint operator-() const { return mint(0) - *this; }
  mint& operator+=(const mint& a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint& a) {
    if ((x += mod - a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint& a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint& a) const { return mint(*this) += a; }
  mint operator-(const mint& a) const { return mint(*this) -= a; }
  mint operator*(const mint& a) const { return mint(*this) *= a; }
  bool operator<(const mint& a) const { return x < a.x; }
  bool operator==(const mint& a) const { return x == a.x; }
};
istream& operator>>(istream& i, mint& a) {
  i >> a.x;
  return i;
}
ostream& operator<<(ostream& o, const mint& a) {
  o << a.x;
  return o;
}
int d[1000005];
void f(int n) {
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      d[i]++;
      if (i * i != n) d[n / i]++;
    }
  }
}
int gcd(int a, int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(n); i++) f(a[i]);
  d[1] = 0;
  bool ok1 = true;
  for (int i = 0; i < (int)(1000005); i++)
    if (d[i] > 1) ok1 = false;
  if (ok1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int x = a[0];
  for (int i = 1; i <= (int)(n - 1); i++) x = gcd(x, a[i]);
  if (x == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
