#include <bits/stdc++.h>
using namespace std;
const long long dx[4] = {-1, 1, 0, 0};
const long long dy[4] = {0, 0, -1, 1};
vector<long long> primes[1000006];
void find_prime() {
  for (long long i = 2; i <= 1e6; i++) {
    if (!primes[i].size())
      for (long long j = i; j <= 1e6; j += i) primes[j].push_back(i);
  }
}
long long n;
long long used[1000006];
void func(long long a) {
  for (long long i : primes[a]) used[i]++;
}
long long final() {
  long long kind = 0;
  for (long long i = 0; i <= 1e6; i++) {
    if (used[i] == n) kind = 2ll;
    if (used[i] > 1) kind = max(kind, 1ll);
  }
  if (!kind) cout << "pairwise coprime";
  if (kind == 1) cout << "setwise coprime";
  if (kind == 2) cout << "not coprime";
}
signed main() {
  find_prime();
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    func(a);
  }
  final();
  return 0;
}
