#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
vector<ll> enumerateDivisors(ll n) {
  vector<ll> res;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (n / i != i) {
        res.push_back(n / i);
      }
    }
  }
  sort(res.begin(), res.end());
  return res;
}
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = int(0); i < int(n); i++) cin >> a.at(i);
  bool pairwiseCoprime = true;
  vector<vector<ll>> d(n);
  for (int i = int(0); i < int(n); i++) {
    d.at(i) = enumerateDivisors(a.at(i));
  }
  set<ll> s;
  for (int i = int(0); i < int(n); i++) {
    for (int j = int(0); j < int(d.at(i).size()); j++) {
      ll dd = d.at(i).at(j);
      if (s.count(dd)) {
        pairwiseCoprime = false;
        break;
      } else {
        s.insert(dd);
      }
    }
    if (!pairwiseCoprime) {
      break;
    }
  }
  ll gcdSum = 0;
  for (int i = int(0); i < int(n); i++) {
    gcdSum = gcd(gcdSum, a.at(i));
  }
  bool setwiseCoprime = gcdSum == 1;
  if (pairwiseCoprime) {
    cout << "pairwise coprime" << endl;
  } else if (setwiseCoprime) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
