#include <bits/stdc++.h>
using namespace std;
template <class T>
void print(const T& t) {
  cout << t << "\n";
}
template <class T, class... Ts>
void print(const T& t, const Ts&... ts) {
  cout << t;
  if (sizeof...(ts)) cout << " ";
  print(ts...);
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int prime(int a, set<int>& st) {
  long long p = 2;
  while (a > p * p) {
    if (a % p == 0) {
      if (st.count(p)) {
        return 1;
      } else
        st.insert(p);
      while (a % p == 0) {
        a /= p;
      }
    }
    p++;
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  set<int> st;
  int flag = 0;
  int g = 0;
  for (int i = 0; i < (n); i++) {
    int a;
    cin >> a;
    g = gcd(a, g);
    flag |= prime(a, st);
  }
  if (flag == 0) {
    print("pairwise coprime");
  } else if (g == 1) {
    print("setwise coprime");
  } else {
    print("not coprime");
  }
}
