#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<bool> flag(1000010, false);
int main() {
  int n;
  cin >> n;
  vl a(n);
  for (int(i) = (0); (i) < (n); (i)++) cin >> a[i];
  bool pc_f = true;
  for (int(i) = (0); (i) < (n); (i)++) {
    ll N = a[i];
    if (N == 1) continue;
    for (ll a = 2; a * a <= N; ++a) {
      if (N % a != 0) continue;
      ll ex = 0;
      while (N % a == 0) {
        ++ex;
        N /= a;
      }
      if (!flag[a])
        flag[a] = true;
      else
        pc_f = false;
    }
    if (N != 1 && !flag[N]) {
      flag[N] = true;
    } else {
      pc_f = false;
    }
    if (!pc_f) break;
  }
  if (pc_f) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll tmp = a[0];
  for (int(i) = (0); (i) < (n - 1); (i)++) {
    tmp = gcd(tmp, a[i + 1]);
  }
  if (tmp != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  cout << "setwise coprime" << endl;
  return 0;
}
