#include <bits/stdc++.h>

using namespace std;

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