#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b) {
    return gcd(b, a % b);
  } else {
    return b;
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
  }
  bool f1 = true, f2 = false, f3 = false;
  int gc = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) {
    gc = gcd(gc, a[i]);
  }
  if (gc == 1) {
    f2 = true;
  }
  int cnt = 0;
  int max = *max_element(a.begin(), a.end());
  for (int i = 2; i * i <= max; i++) {
    cnt = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] % i == 0) {
        cnt++;
      }
    }
    if (cnt >= 2) {
      f1 = false;
    }
  }
  string ans;
  if (f1) {
    ans = "pairwise coprime";
  } else if (f2) {
    ans = "setwise coprime";
  } else {
    ans = "not coprime";
  }
  cout << ans << endl;
}
