#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) {
    int tmp = b;
    b = a;
    a = tmp;
  }
  int r = a % b;
  if (r == 0) {
    return b;
  }
  return gcd(b, r);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> b;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  int flag = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int ans = gcd(a.at(i), a.at(j));
      b.push_back(ans);
      if (ans != 1) {
        flag = 1;
      }
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  sort(b.begin(), b.end());
  for (int i = 0; i < int(b.size()) - 1; i++) {
    if (b.at(i) == b.at(i + 1)) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
}
