#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> A(n + 1);
  for (int i = 1; i <= n; i++) cin >> A[i];
  vector<int> suffix(n + 1);
  suffix[n] = A[n];
  for (int i = n - 1; i >= 1; i--) {
    if (suffix[i + 1] == 1)
      suffix[i] = 1;
    else
      suffix[i] = gcd(A[i], suffix[i + 1]);
  }
  bool flag = true;
  for (int i = 1; i < n; i++) {
    if (suffix[i] != 1) {
      flag = false;
      break;
    }
  }
  if (flag)
    cout << "pairwise coprime" << endl;
  else if (suffix[1] == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  fflush(stdout);
  return 0;
}
