#include <bits/stdc++.h>
using namespace std;
void factorize(int n, set<int>& factors) {
  int s = floor(sqrt(n));
  int i = 2;
  while (i <= s) {
    if (n % i == 0) {
      factors.insert(i);
      n /= i;
      s = floor(sqrt(n));
    } else {
      i++;
    }
  }
  if (n > 1) {
    factors.insert(n);
  }
}
int main(void) {
  int N;
  cin >> N;
  vector<int> A_list(N);
  for (int i = 0; i < N; i++) {
    cin >> A_list[i];
  }
  int m = *max_element(A_list.begin(), A_list.end());
  vector<bool> prime_flag(m + 1, true);
  prime_flag[1] = false;
  map<int, int> prime_table;
  for (int i = 2; i <= m; i++) {
    if (prime_flag[i]) {
      prime_table[i] = prime_table.size();
      for (int j = i * 2; j <= m; j += i) {
        prime_flag[j] = false;
      }
    }
  }
  vector<int> table(prime_table.size() + 1, 0);
  for (auto A : A_list) {
    set<int> factors;
    factorize(A, factors);
    for (auto f : factors) {
      table[prime_table[f]] += 1;
    }
  }
  int c = *max_element(table.begin(), table.end());
  if (c == 1) {
    cout << "pairwise coprime" << endl;
  } else if (c == N) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
