#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using lint = long long;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
using vvi = vector<vector<int>>;
using vs = vector<string>;
using vc = vector<char>;
using vcc = vector<vector<char>>;
using vm = vector<short>;
using vmm = vector<vector<short>>;
using pii = pair<int, int>;
using psi = pair<string, int>;
using ld = long double;
using ull = unsigned long long;
using ui = unsigned int;
using qul = queue<ll>;
using pql = priority_queue<ll>;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
constexpr ll mod = 1e9 + 7;
constexpr long double pi = 3.141592653589793238462643383279;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
map<lint, lint> s;
void enum_divisors(long long N) {
  for (int i = 2; i < pow(N, 0.6) + 1; i++) {
    if (N % i == 0) s[i]++;
  }
  s[N]++;
  return;
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  lint n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    lint x;
    cin >> x;
    enum_divisors(x);
  }
  bool a = false;
  bool b = false;
  for (int i = 0; i < 1010; i++) {
    if (s[i] > 1) a = true;
    if (s[i] == n) b = true;
  }
  if (!a)
    cout << "pairwise coprime" << endl;
  else {
    if (!b)
      cout << "setwise coprime" << endl;
    else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
