#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = 1LL << 62;
const double PI = acos(-1);
const double eps = 1e-10;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  sort(a.rbegin(), a.rend());
  ll all = gcd(a[0], a[1]);
  for (int i = 0; i < (int)(n); i++) all = gcd(all, a[i]);
  bool pc = true;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        pc = false;
        break;
      }
    }
    if (!pc) break;
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
  } else if (!pc && all == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
