#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<int> dx = {0, 1, 0, -1};
vector<int> dy = {1, 0, -1, 0};
const ll LINF = 2e18;
const int INF = 1e9;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
void solve(ll N, std::vector<ll> A) {
  bool res_pc = false;
  bool res_sc;
  res_pc = true;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A.at(i), A.at(j)) != 1) {
        res_pc = false;
        break;
      }
    }
  }
  ll g = gcd(A.at(0), A.at(1));
  for (int i = 0; i < N - 2; i++) {
    g = gcd(A.at(i + 2), g);
  }
  res_sc = (g == 1);
  if (res_pc) {
    cout << "pairwise coprime" << endl;
  } else if (res_sc) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  ll N;
  scanf("%lld", &N);
  std::vector<ll> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
