#include <bits/stdc++.h>
using namespace std;
vector<long long> primes(long long x) {
  vector<long long> ret;
  for (long long i = 2; i * i <= x; i++) {
    if (x % i) continue;
    while (x % i == 0) x /= i;
    ret.push_back(i);
  }
  if (x != 1) ret.push_back(x);
  return ret;
}
signed main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  map<long long, long long> primes_cnt;
  for (auto& x : A) {
    cin >> x;
    for (auto e : primes(x)) {
      primes_cnt[e]++;
    }
  }
  long long ma = 0;
  for (auto p : primes_cnt) {
    ma = max(ma, p.second);
  }
  if (ma == N) {
    cout << "not coprime\n";
  } else if (ma > 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "pairwise coprime\n";
  }
}
