#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  bool pairwise = true;
  vector<int> atable(2000005, 0);
  vector<bool> table(2000005, false);
  vector<int> A(N);
  for (auto&& e : A) {
    cin >> e;
    atable[e]++;
  }
  for (int i = 2; i * i < 2000005; i++) {
    if (table[i]) continue;
    int cnt = 0;
    for (int k = 1; i * k < 2000005 + 1; k++) {
      cnt += atable[i * k];
      table[k * i] = true;
    }
    if (cnt > 1) {
      pairwise = false;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  int g = A[0];
  for (auto&& e : A) {
    g = gcd(g, e);
  }
  if (g == 1) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
  return 0;
}
