#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int a_max;
vector<bool> f(1e6 + 1, true);
void sieve(void) {
  f[0] = false, f[1] = false;
  for (int i = 2; i <= a_max; ++i) {
    if (f[i]) {
      for (int j = 2 * i; j <= a_max; j += i) f[j] = false;
    }
  }
}
map<ll, ll> prime_factory(int x) {
  map<ll, ll> res;
  if (f[x]) {
    res[x] = 1;
    return res;
  }
  set<ll> st;
  vector<ll> tmp;
  for (int i = 2; i * i <= x; ++i) {
    if (x % i == 0) {
      st.insert(i);
      if (x % (x / i) == 0) st.insert(x / i);
    }
  }
  for (auto i : st) {
    if (f[i]) {
      while (x % i == 0) {
        tmp.push_back(i);
        x /= i;
      }
    }
  }
  for (auto i : tmp) res[i]++;
  return res;
}
void solve(void) {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < int(n); ++i) cin >> a[i];
  a_max = *max_element(a.begin(), a.end());
  sieve();
  map<ll, ll> mp;
  for (int i = 0; i < int(n); ++i) {
    for (auto i : prime_factory(a[i])) mp[i.first] += 1;
  }
  bool flag = true;
  bool flag_x = true;
  for (auto i : mp) {
    if (i.second > 1) flag = false;
    if (i.second == n) flag_x = false;
  }
  if (flag)
    cout << "pairwise coprime" << endl;
  else {
    if (flag_x)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
int main(void) { solve(); }
