#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
ll gcd(ll a, ll b) {
  if (a < b) swap(a, b);
  bool have_mod = true;
  while (have_mod) {
    ll mod = a % b;
    if (mod == 0) have_mod = false;
    a = b;
    b = mod;
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < int(n); ++i) cin >> a[i];
  int nax = -INF;
  for (int i = 0; i < int(n); ++i) nax = max(nax, a[i]);
  bool con = true;
  bool flag1 = true;
  bool flag2 = true;
  int cur_nax = nax;
  while (cur_nax > 1) {
    int cnt = 0;
    bool div = true;
    for (int i = 0; i < int(n); ++i) {
      if (a[i] % cur_nax != 0)
        div = false;
      else
        cnt++;
      if (div == false && flag2 == false) break;
    }
    if (cnt > 1) flag2 = false;
    if (div) {
      flag1 = false;
      break;
    }
    cur_nax--;
    if (flag1 == false && flag2 == false) break;
  }
  if (flag2)
    cout << "pairwise coprime" << endl;
  else if (flag1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
