#include <bits/stdc++.h>
using namespace std;
const int nmax = 1e6;
vector<pair<int, int>> primes = {{2, 0}};
bitset<nmax> sieve;
bool setwise = true;
bool pairwise = true;
void sieve_of_eratosthenes() {
  sieve[0] = 1;
  sieve[1] = 1;
  for (int i = 3; i * i <= nmax; ++i) {
    if (sieve[i]) continue;
    for (int j = i * i; j <= nmax; j += i) sieve[j] = 1;
  }
  for (int i = 3; i <= nmax; ++i) {
    if (!sieve[i]) primes.push_back({i, 0});
  }
}
int main() {
  sieve_of_eratosthenes();
  int n, a;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a;
    for (auto& prime : primes) {
      if (a % prime.first == 0) ++prime.second;
      if (prime.second >= 2) pairwise = false;
      if (prime.second == n) setwise = false;
    }
  }
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (setwise)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
