#include <bits/stdc++.h>
using std::cin, std::cout, std::bitset, std::complex;
using std::min_element, std::max_element, std::accumulate;
using std::priority_queue, std::set, std::map, std::unordered_map;
using std::sort, std::greater, std::min, std::max, std::reverse;
using std::vector, std::array, std::string, std::pair, std::list, std::queue,
    std::deque;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ull = unsigned long long int;
using ll = long long int;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vd = vector<double>;
using vvd = vector<vd>;
using vvvd = vector<vvd>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using cdouble = complex<double>;
const double eps = 1e-7;
bool feq(double x, double y) { return abs(x - y) <= eps; }
bool inrange(ll x, ll t) { return x >= 0 && x < t; }
bool inrange(vll xs, ll t) {
  for (const auto &x : xs)
    if (!(x >= 0 && x < t)) return false;
  return true;
}
int ceillog2(ll x) {
  int m = int(log2(x));
  return m + ((1LL << m) < x ? 1 : 0);
}
int floorlog2(ll x) {
  int m = int(log2(x));
  return m - ((1LL << m) > x ? 1 : 0);
}
const string endl = "\n";
template <class T>
T reversed(T container) {
  reverse(container.begin(), container.end());
  return container;
}
template <class T>
void printv(const vector<T> &v) {
  for (const T &x : v) cout << x << " ";
  cout << endl;
}
template <class T>
void printmx(const vector<vector<T>> &mx) {
  for (const vector<T> &v : mx) printv(v);
}
ll rndf(double x) { return (ll)(x + (x >= 0 ? 0.5 : -0.5)); }
ll floorsqrt(ll x) {
  ll m = (ll)sqrt((double)x);
  return m + (m * m <= x ? 0 : -1);
}
ll ceilsqrt(ll x) {
  ll m = (ll)sqrt((double)x);
  return m + (x <= m * m ? 0 : 1);
}
ll rnddiv(ll a, ll b) { return (a / b + (a % b * 2 >= b ? 1 : 0)); }
ll ceildiv(ll a, ll b) { return (a / b + (a % b == 0 ? 0 : 1)); }
ll gcd(ll m, ll n) {
  if (n == 0)
    return m;
  else
    return gcd(n, m % n);
}
ll lcm(ll m, ll n) { return ll(m) * ll(n) / gcd(m, n); }
ll powll(ll n, ll p) {
  if (p == 0)
    return 1;
  else if (p == 1)
    return n;
  else {
    ll ans = powll(n, p / 2);
    ans = ans * ans;
    if (p % 2 == 1) ans = ans * n;
    return ans;
  }
}
vll list_prime_until(ll n) {
  vll ret;
  vector<bool> a(n + 1, true);
  if (a.size() > 0) a[0] = false;
  if (a.size() > 1) a[1] = false;
  for (int i = 0; i < int(n + 1); i++) {
    if (a[i]) {
      ret.push_back(i);
      ll k = (ll)i * i;
      while (k < n + 1) {
        a[int(k)] = false;
        k += i;
      }
    }
  }
  return ret;
}
vector<Pll> prime_factorize(ll n, const vll &primes) {
  vector<Pll> ret;
  for (int i = 0; i < int(primes.size()); i++) {
    if (n == 1) break;
    while (n % primes[i] == 0) {
      if (ret.size() == 0 || ret.back().first != primes[i]) {
        ret.push_back({primes[i], 0});
      }
      ret.back().second++;
      n /= primes[i];
    }
  }
  if (n != 1) ret.push_back({n, 1});
  return ret;
}
vll divisors(const vector<Pll> factors) {
  queue<ll> que;
  que.push(1);
  for (int i = 0; i < int(factors.size()); i++) {
    ll x = factors[i].first, d = factors[i].second;
    vll a(d + 1, 1);
    for (int j = 1; j <= int(d); j++) a[j] = a[j - 1] * x;
    int m = int(que.size());
    for (int j = 0; j < int(m); j++) {
      ll y = que.front();
      que.pop();
      for (int k = 0; k < int(d + 1); k++) que.push(y * a[k]);
    }
  }
  int m = int(que.size());
  vll ret(m);
  for (int i = 0; i < int(m); i++) {
    ret[i] = que.front();
    que.pop();
  }
  sort(ret.begin(), ret.end());
  return ret;
}
int main() {
  map<ll, int> mp;
  vll primes = list_prime_until(10000);
  int n;
  cin >> n;
  vll a(n);
  for (int i = 0; i < int(n); i++) cin >> a[i];
  for (int i = 0; i < int(n); i++) {
    auto fs = prime_factorize(a[i], primes);
    for (const auto &f : fs) {
      mp[f.first]++;
    }
  }
  int judge = 2;
  for (const auto &x : mp) {
    if (x.second >= 2) {
      judge = 1;
    }
    if (x.second == n) {
      judge = 0;
    }
  }
  if (judge == 2) {
    cout << "pairwise coprime" << endl;
  } else if (judge == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
