#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  bool is_pairwise_coprime = true;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(a.at(i), a.at(j)) != 1) {
        is_pairwise_coprime = false;
      }
    }
  }
  bool is_setwise_coprime = true;
  int x = a.at(0);
  for (int i = 1; i < n; i++) {
    int y = a.at(i);
    x = gcd(x, y);
  }
  if (x != 1) {
    is_setwise_coprime = false;
  }
  if (is_pairwise_coprime) {
    cout << "pairwise coprime" << endl;
  } else if (is_setwise_coprime) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
