#include <bits/stdc++.h>
using namespace std;
bool judgeprime(int i, int j, vector<int> &prime) {
  if (sqrt(i) < prime.at(j)) return true;
  if (i % prime.at(j) != 0) {
    if (judgeprime(i, j + 1, prime))
      return true;
    else
      return false;
  } else
    return false;
}
bool pairwise_coprime(vector<vector<bool>> &flag, int n, int prime_size) {
  for (int i = 0; i < prime_size; i++) {
    bool flag_1 = true;
    for (int j = 0; j < n; j++) {
      if (flag_1) {
        if (flag.at(j).at(i))
          continue;
        else {
          flag_1 = false;
          continue;
        }
      }
      if (flag.at(j).at(i))
        continue;
      else
        return false;
    }
  }
  return true;
}
bool setwise_coprime(vector<vector<bool>> &flag, int n, int prime_size) {
  for (int i = 0; i < prime_size; i++) {
    for (int j = 0; j < n; j++) {
      if (flag.at(j).at(i))
        break;
      else {
        if (j == n - 1)
          return false;
        else
          continue;
      }
    }
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  vector<int> prime = {2};
  for (int i = 3; i <= 1000; i++) {
    if (judgeprime(i, 0, prime)) prime.push_back(i);
  }
  vector<vector<bool>> flag(n, vector<bool>(prime.size()));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < prime.size(); j++) {
      if (a.at(i) % prime.at(j) == 0)
        flag.at(i).at(j) = false;
      else
        flag.at(i).at(j) = true;
    }
  }
  if (pairwise_coprime(flag, n, prime.size()))
    cout << "pairwise coprime" << endl;
  else if (setwise_coprime(flag, n, prime.size()))
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
