#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e3;
vector<bool> isp(MAX_N + 1, true);
vector<int> primeNumbers;
void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i = 2; i * i <= MAX_N; i++) {
    if (isp[i] == true) {
      for (int j = 2; i * j <= MAX_N; j++) {
        isp[i * j] = false;
      }
    }
  }
  for (int i = 2; i <= MAX_N; i++) {
    if (isp[i] == true) primeNumbers.push_back(i);
  }
}
bool isPrime(int num) {
  if (num == 0 || num == 1) return false;
  int n = primeNumbers.size();
  for (int i = 0; i < n; i++) {
    if (num == primeNumbers[i]) return true;
    if (num % primeNumbers[i] == 0) return false;
  }
  return true;
}
int gcd(int a, int b) {
  if (a < b) return gcd(b, a);
  int r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
int main() {
  sieve();
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  set<int> factorList;
  bool isPairWise = true;
  for (int i = 0; i < n; i++) {
    if (isPrime(A[i]) == true) {
      if (factorList.count(A[i]) != 0) {
        isPairWise = false;
        break;
      } else {
        factorList.insert(A[i]);
      }
    } else {
      int maxP = primeNumbers.size();
      for (int j = 0; j < maxP; j++) {
        if (A[i] % (primeNumbers[j]) == 0) {
          if (factorList.count(primeNumbers[j]) != 0) {
            isPairWise = false;
          } else {
            factorList.insert(primeNumbers[j]);
          }
          while (A[i] % primeNumbers[j] != 0) {
            A[i] /= primeNumbers[j];
          }
        }
      }
      if (isPairWise == false) break;
    }
  }
  int cumProduct = gcd(A[0], A[1]);
  for (int i = 2; i < n; i++) {
    cumProduct = gcd(cumProduct, A[i]);
  }
  bool isSetWise;
  if (cumProduct == 1) {
    isSetWise = true;
  } else {
    isSetWise = false;
  }
  if (isPairWise == true) {
    cout << "pairwise coprime" << endl;
  } else if (isSetWise == true) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
