#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  x = min(x, y);
  y = max(x, y);
  while (y % x != 0) {
    int m = y % x;
    y = x;
    x = m;
  }
  return x;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  bool p = true;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        p = false;
        break;
      }
    }
    if (!p) break;
  }
  int m = a[0];
  for (int i = 1; i < n; i++) {
    m = gcd(m, a[i]);
  }
  if (p) {
    cout << "pairwise coprime" << endl;
  } else if (m == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
