#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<bool> sieve_of_eratosthenes(vector<bool> is_prime) {
  int lim = (int)is_prime.size();
  for (int i = 2; i <= sqrt(lim); i++) {
    if (is_prime.at(i) == true) {
      for (int j = i * 2; j < lim; j = j + i) {
        is_prime.at(j) = false;
      }
    }
  }
  return is_prime;
}
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
int main() {
  int n;
  cin >> n;
  vector<bool> is_prime(1000000, true);
  is_prime = sieve_of_eratosthenes(is_prime);
  vector<int> a;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (is_prime.at(x) == false) {
      a.push_back(x);
    }
  }
  int a_size = a.size();
  bool is_pairwise_coprime = true;
  for (int i = 0; i < a_size; i++) {
    for (int j = i + 1; j < a_size; j++) {
      if (gcd(a.at(i), a.at(j)) != 1) {
        is_pairwise_coprime = false;
      }
    }
  }
  bool is_setwise_coprime = true;
  int x = a.at(0);
  for (int i = 1; i < a_size; i++) {
    int y = a.at(i);
    x = gcd(x, y);
  }
  if (x != 1) {
    is_setwise_coprime = false;
  }
  if (is_pairwise_coprime) {
    cout << "pairwise coprime" << endl;
  } else if (is_setwise_coprime) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
