#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
const int MAX = 1010;
const int mod = 1e9 + 7;
const int MAXLV = 16;
using namespace std;
int n;
int gcd(int a, int b) {
  while (b) {
    int aux = b;
    b = a % b;
    a = aux;
  }
  return a;
}
int main() {
  cin.tie(0), cin.sync_with_stdio(false);
  cin >> n;
  bool parwise = true;
  int aux = 0;
  set<int> st;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (aux == 0) {
      aux = x;
    } else {
      aux = gcd(aux, x);
    }
    for (int j = 2; j * j <= x && parwise; j++) {
      if (x % j == 0) {
        if (st.count(j)) {
          parwise = 0;
        }
        st.insert(j);
        while (x % j == 0 && parwise) {
          x /= j;
        }
      }
    }
  }
  if (parwise) {
    cout << "pairwise coprime\n";
  } else if (aux == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
