#include <bits/stdc++.h>
using namespace std;
int n;
int spf[1000009];
int cnt[1000009];
int __gcd(int a, int b) {
  if (a == 0) return b;
  return __gcd(b % a, a);
}
void pre() {
  memset(spf, 0, sizeof spf);
  memset(cnt, 0, sizeof cnt);
  spf[1] = 1;
  for (int i = 2; i <= 1000000; i++) {
    if (spf[i] == 0) {
      spf[i] = i;
      for (int j = 2 * i; j <= 1000000; j += i)
        if (spf[j] == 0) spf[j] = i;
    }
  }
}
int main() {
  cin >> n;
  vector<int> a(n);
  pre();
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    if (a[i] == 1) continue;
    cnt[spf[a[i]]] += 1;
    if (cnt[spf[a[i]]] >= 2) {
      flag = false;
      break;
    }
  }
  if (flag)
    cout << "pairwise coprime" << endl;
  else {
    int gg = a[0];
    for (int i = 1; i < n; i++) {
      gg = __gcd(gg, a[i]);
    }
    if (gg == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
