#include <bits/stdc++.h>
using namespace std;
int N_MAX = 1e6;
int p_MAX = 1000;
vector<int> prime;
int calc_prime() {
  bool notPrime[p_MAX];
  int n = sqrt(p_MAX) + 1;
  notPrime[0] = 1;
  notPrime[1] = 1;
  for (int i = 0; i <= n; i++) {
    if (notPrime[i]) continue;
    int m = p_MAX / i;
    for (int j = 2; j <= m; j++) notPrime[j * i] = 1;
  }
  prime.clear();
  for (int i = 0; i < p_MAX; i++)
    if (!notPrime[i]) prime.push_back(i);
  return 0;
}
int main() {
  int n, i, j;
  int a[N_MAX];
  bool p = 1, s = 1, pp, ss;
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  calc_prime();
  for (i = 0; i < prime.size(); i++) {
    pp = 0;
    ss = 1;
    for (j = 0; j < n; j++) {
      if (a[j] % prime[i] == 0) {
        if (pp == 1) p = 0;
        pp = 1;
        while (a[j] % prime[i] == 0) a[j] /= prime[i];
      } else {
        ss = 0;
      }
    }
    if (ss == 1) s = 0;
  }
  if (p == 1)
    cout << "pairwise coprime" << endl;
  else if (s == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
