#include <bits/stdc++.h>
using namespace std;
int pr[1000000] = {2, 3};
int ind = 2;
void prime() {
  for (int i = 5; i < 1000000; i += 2) {
    for (int j = 1; pr[j] < i / pr[j - 1] + pr[j - 1] && pr[j] != 0; j++) {
      if (i % pr[j] == 0)
        break;
      else if (pr[j + 1] == 0) {
        pr[ind] = i;
        ind++;
      }
    }
  }
  return;
}
void chek(int num, map<int, int> &fac) {
  set<int> st;
  if (num % 2 == 0) st.insert(2);
  for (int i = 1; pr[i] < num / pr[i - 1] + pr[i - 1]; i++) {
    if (num % pr[i] == 0) {
      st.insert(pr[i]);
    }
  }
  if (st.empty()) {
    st.insert(num);
  }
  for (set<int>::iterator it = st.begin(); it != st.end(); it++) {
    fac[*it]++;
  }
  return;
}
int main() {
  prime();
  int n, ans = 0;
  cin >> n;
  int x;
  map<int, int> fac;
  for (int i = 0; i < n; i++) {
    cin >> x;
    chek(x, fac);
  }
  map<int, int>::iterator itr;
  for (itr = fac.begin(); itr != fac.end(); itr++) {
    if (itr->second > 1) ans++;
    if (itr->second == n) {
      cout << "not coprime";
      return 0;
    }
  }
  if (ans) {
    cout << "setwise coprime";
  } else {
    cout << "pairwise coprime";
  }
  return 0;
}
