#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
vector<long long> cnt(1000005, 0);
void enum_divisors(long long N) {
  for (long long i = 1; i * i <= N; ++i) {
    if (N % i == 0) {
      cnt[i]++;
      if (N / i != i) cnt[N / i];
    }
  }
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  bool flag_1 = false;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) flag_1 = true;
    enum_divisors(a[i]);
  }
  bool flag = true;
  for (long long i = 2; i <= 1000000; i++) {
    if (cnt[i] > 1) flag = false;
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long now_gcd = a[0];
  for (long long i = 1; i < n; i++) {
    now_gcd = gcd(now_gcd, a[i]);
  }
  if (now_gcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  } else {
    cout << "not coprime" << endl;
    return 0;
  }
  return 0;
}
