#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = LONG_LONG_MAX / 2;
const ll mod = 1000000000 + 7;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
vector<ll> prime_factorize(ll N) {
  vector<ll> res;
  for (ll a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    while (N % a == 0) {
      N /= a;
    }
    res.push_back(a);
  }
  if (N != 1) res.push_back(N);
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  set<int> pairwise;
  map<int, int> setwise;
  vector<ll> v0 = prime_factorize(A[0]);
  for (auto i : v0) {
    pairwise.insert(i);
    setwise[i]++;
  }
  bool is_pairwise = true;
  for (int i = 1; i < N; i++) {
    vector<ll> v = prime_factorize(A[i]);
    for (auto j : v) {
      if (is_pairwise) {
        if (pairwise.count(j) == 0)
          pairwise.insert(j);
        else
          is_pairwise = false;
      }
      setwise[j]++;
    }
  }
  bool is_setwise = true;
  for (auto i : setwise) {
    if (i.second == N) is_setwise = false;
  }
  if (is_pairwise)
    cout << "pairwise coprime" << endl;
  else if (is_setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
