#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, a, prime[maxn];
set<int> st, st2;
int main() {
  cin >> n;
  for (int i = 2; i < maxn; i++) {
    if (!prime[i]) {
      for (int j = i; j < maxn; j += i) {
        prime[j] = i;
      }
    }
  }
  cin >> a;
  while (prime[a]) {
    st.insert(prime[a]);
    int x = prime[a];
    while (a % x == 0) a /= x;
  }
  st2 = st;
  bool pairwise = true;
  for (int i = 1; i < n; i++) {
    cin >> a;
    set<int> tmp;
    for (auto j : st2) {
      if (a % j == 0) tmp.insert(j);
    }
    st2 = tmp;
    while (prime[a]) {
      if (st.count(prime[a])) pairwise = false;
      st.insert(prime[a]);
      int x = prime[a];
      while (a % x == 0) a /= x;
    }
  }
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (!st2.size())
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
