#include <bits/stdc++.h>
using namespace std;
int a[1000005];
int gcd(int a, int b) {
  int r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
void solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = gcd(a[n - 1], a[n - 2]);
  bool pc = ans == 1 ? true : false;
  for (int i = n - 3; i >= 0; i--) {
    ans = gcd(ans, a[i]);
    if (ans != 1) pc = false;
  }
  if (ans == 1) {
    cout << (pc ? "pairwise coprime" : "setwise coprime") << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main(int argc, char* argv[]) {
  solve();
  return 0;
}
