#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1LL << 60;
const int MOD = 1e9 + 7;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
std::vector<int> Eratosthenes(const int N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  int N;
  cin >> N;
  vector<int> primeList = Eratosthenes(1000);
  vector<int> list_A(N);
  bool isP = true;
  bool isS = true;
  bool isN = false;
  for (int i = 0; i < (int)(N); i++) {
    int a;
    cin >> a;
    if (a != 1) {
      list_A.at(i) = a;
    } else {
      isP = false;
    }
  }
  int sizeA = list_A.size();
  sort(list_A.begin(), list_A.end());
  list_A.erase(unique(list_A.begin(), list_A.end()), list_A.end());
  if (sizeA != list_A.size()) {
    isP = false;
  }
  if (list_A.size() == 0) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < (int)(primeList.size()); i++) {
    int numOfNotZero = 0;
    for (int j = 0; j < (int)(list_A.size()); j++) {
      if (list_A.at(j) % primeList.at(i) == 0) {
        numOfNotZero++;
      }
    }
    if (numOfNotZero == list_A.size()) {
      isS = false;
      isN = true;
      isP = false;
      break;
    }
    if (numOfNotZero >= 2) {
      isP = false;
    }
  }
  if (isP) {
    cout << "pairwise coprime" << endl;
  } else if (isS) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
