#include <bits/stdc++.h>
using namespace std;
using Int = int64_t;
using P = pair<Int, Int>;
const Int INF = 1 << 30;
const Int MOD = (Int)1e9 + 7;
const Int MAX_N = (Int)1e5 + 5;
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << p.first << " " << p.second;
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (int i = 0; i < (int)v.size(); i++)
    os << v[i] << (i + 1 != v.size() ? " " : "");
  return os;
}
bool is_prime(long long n) {
  if (n <= 1) return false;
  for (long long p = 2; p * p <= n; ++p) {
    if (n % p == 0) return false;
  }
  return true;
}
vector<Int> func(Int n) {
  vector<Int> res;
  for (Int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      if (!is_prime(i)) continue;
      res.push_back(i);
    }
  }
  return res;
}
Int GCD(Int a, Int b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
void solve() {
  Int N;
  cin >> N;
  vector<Int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<vector<Int>> divisors;
  map<Int, Int> mp;
  for (int i = 0; i < N; i++) {
    vector<Int> tmp = func(A[i]);
    for (int j = 0; j < tmp.size(); j++) {
      mp[tmp[j]]++;
    }
    divisors.push_back(tmp);
  }
  bool ok = true;
  for (int i = 0; i < N; i++) {
    if (ok == false) break;
    for (int j = 0; j < divisors[i].size(); j++) {
      mp[divisors[i][j]]--;
    }
    for (int j = 0; j < divisors[i].size(); j++) {
      Int v = divisors[i][j];
      if (mp[v] > 0) {
        ok = false;
        break;
      }
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return;
  }
  Int v = A.front();
  for (int i = 0; i < N; i++) {
    v = GCD(v, A[i]);
  }
  if (v == 1) {
    cout << "setwise coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
