#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
ll gcd(ll m, ll n) {
  if (n == 0) return m;
  return gcd(n, m % n);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  vector<ll> ra(n + 1);
  ra[0] = 1;
  for (int i = 0; i < (int)(n); i++) {
    ra[i + 1] = ra[i] * a[i] % MOD;
  }
  bool ans1 = 1, ans2 = 1;
  for (int i = 0; i < n - 1; i++) {
    ll p = gcd(a[i], ((ra[n] / ra[i + 1]) % MOD) % MOD);
    if (p != 1) {
      ans1 = 0;
      break;
    }
  }
  if (ans1)
    cout << "pairwise coprime" << endl;
  else {
    ll q = 0;
    for (int i = 0; i < (int)(n); i++) {
      q = gcd(q, a[i]);
    }
    if (q == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
