#include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> p(n + 2, 1);
  for (long long i = n - 1; i >= 0; i--) {
    p[i] = p[i + 1] * 1LL * a[i];
  }
  bool pc = true;
  for (long long i = 0; i < n - 1; i++) {
    long long nxt = p[i + 1];
    pc &= (__gcd(a[i], nxt) == 1);
  }
  if (pc) {
    cout << "pairwise coprime" << '\n';
    exit(0);
  }
  long long x = a[0];
  for (long long i = 1; i < n; i++) {
    x = __gcd(x, a[i]);
  }
  if (x == 1) {
    cout << "setwise coprime" << '\n';
  }
  else {
    cout << "not coprime" << '\n';
  }
}
