#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
int gcds(vector<int> as) {
  int ans = as[0];
  for (int i = 1; i < as.size(); i++) {
    ans = gcd(ans, as[i]);
  }
  return ans;
}
bool isPairwise(vector<int> as) {
  int n = as.size();
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(as[i], as[j]) != 1) {
        return false;
      }
    }
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> as(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> as[i];
  }
  bool ok = isPairwise(as);
  int g = gcds(as);
  if (ok) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
