#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() {
  vector<int> a;
  int n;
  cin >> n;
  a.resize(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool flag = false;
  for (int i = 0; i < n - 1; i++) {
    if (gcd(a[i], a[i + 1]) != 1) {
      flag = true;
      break;
    }
  }
  if (!flag) {
    cout << "pairwise coprime";
  } else {
    int ans = a[0];
    for (int i = 0; i < n; i++) {
      ans = gcd(a[i], ans);
    }
    if (ans == 1) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
  return 0;
}
