#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int main() {
  int n;
  cin >> n;
  int input;
  vector<int> optimus;
  set<int> getgcd;
  for (int i = 0; i < n; i++) {
    cin >> input;
    optimus.push_back(input);
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      getgcd.insert(gcd(optimus.at(i), optimus.at(j)));
    }
  }
  if (getgcd.size() == 1) {
    if (getgcd.count(1) == 1) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  } else if (getgcd.size() >= 1) {
    cout << "setwise coprime" << endl;
  }
  optimus.clear();
  getgcd.clear();
  return 0;
}
