#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1000010;
int N;
int A[MAX_N];
bool sieve[1000010];
vector<int> primes;
int prime_count[1000010];
void compute_primes() {
  fill(sieve + 2, sieve + 1000000, true);
  for (int i = 2; i <= 1000000; i++) {
    if (sieve[i]) {
      for (int j = 2; i * j <= 1000000; j++) sieve[i * j] = false;
    }
  }
  for (int i = 2; i <= 1000000; i++)
    if (sieve[i]) primes.push_back(i);
}
void process(int x) {
  for (int i = 0; i < (int)primes.size() && x > 1; i++) {
    if (x % primes[i] == 0) {
      ++prime_count[primes[i]];
      while (x % primes[i] == 0) x /= primes[i];
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  compute_primes();
  for (int i = 0; i < N; i++) process(A[i]);
  bool pairwise = true, setwise = true;
  for (int i = 2; i <= 1000000; i++) {
    if (prime_count[i] > 1) pairwise = false;
    if (prime_count[i] == N) setwise = false;
  }
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (setwise)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
