#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> primes;
  bool is_prime;
  unordered_map<int, int> found_prime;
  bool pairwise{true}, setwiset{true};
  for (int i = 2; i <= 1000; i++) {
    is_prime = true;
    for (int p : primes) {
      if (i % p == 0) {
        is_prime = false;
        break;
      }
    }
    if (is_prime) primes.push_back(i);
  }
  int N, a;
  vector<int> arr;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> a;
    arr.push_back(a);
  }
  int pr;
  for (int i = N - 1; i >= 0; i--) {
    for (int j = 0; j < primes.size(); j++) {
      pr = primes[j];
      if (arr[i] % pr == 0) {
        while (arr[i] % pr == 0) {
          arr[i] /= pr;
        }
        found_prime[pr]++;
        if (found_prime[pr] > 1) pairwise = false;
        if (found_prime[pr] == N) setwiset = false;
      }
      if (arr[i] == 1) break;
    }
    if (arr[i] != 1) {
      found_prime[arr[i]]++;
    }
  }
  if (pairwise)
    cout << "pairwise coprime";
  else if (setwiset)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
