#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string ans = "not coprime";
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long t_size = *max_element(a.begin(), a.end());
  vector<long long> table(t_size + 10, 0);
  for (long long i = 0; i < n; i++) {
    for (long long j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        table[j]++;
        if (a[i] / j != j) table[a[i] / j]++;
      }
    }
  }
  bool ok = true;
  for (long long i = 2; i < table.size(); i++) {
    if (table[i] > 1 && table[i] < n) {
      ans = "setwise coprime";
      ok = false;
      break;
    }
    if (table[i] > 1) {
      ok = false;
      break;
    }
  }
  if (ok) {
    ans = "pairwise coprime";
  }
  cout << ans << endl;
  return 0;
}
