#include <bits/stdc++.h>
using namespace std;
const unsigned long long BASE = (unsigned long long)(1e9 + 7);
bool isP(int n) {
  int end = sqrt(n);
  for (int j = (2); j < (end + 1); j++) {
    if (n % j == 0) return false;
  }
  return true;
}
int gcd(int a, int b) {
  if (b > a) std::swap(a, b);
  while (b != 0) {
    a = a % b;
    std::swap(a, b);
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  int moreThan1 = 0;
  int allGcd = 1;
  int* a = new int[n];
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    if (a[i] > 1) moreThan1++;
    if (i == 0)
      allGcd = a[i];
    else
      allGcd = gcd(allGcd, a[i]);
  }
  if (allGcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  } else if (moreThan1 >= 78500) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  set<int> prime;
  prime.insert(2);
  for (int i = 3; i < 1000000; i += 2) {
    if (isP(i)) prime.insert(i);
  }
  for (int i = 0; i < (n); i++) {
    int number = a[i];
    int end = sqrt(number);
    if (isP(number)) {
      auto pFind = prime.find(number);
      if (pFind != prime.end()) {
        prime.erase(pFind);
        continue;
      } else {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
    for (auto pPrime = prime.begin(); pPrime != prime.end();) {
      if (*pPrime > end) break;
      if (number % *pPrime == 0) {
        do {
          number /= *pPrime;
        } while (number % *pPrime == 0);
        pPrime = prime.erase(pPrime);
      } else
        pPrime++;
    }
    if (number > 1) {
      if (isP(number)) {
        auto pFind = prime.find(number);
        if (pFind != prime.end()) {
          prime.erase(pFind);
          continue;
        } else {
          cout << "setwise coprime" << endl;
          return 0;
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
