#include <bits/stdc++.h>
using namespace std;
int getGCD(vector<int> &numList) {
  sort(numList.begin(), numList.end());
  for (int i = numList[0]; i > 1; i--) {
    bool isDivisor = true;
    for (int num : numList) {
      if (num % i != 0) {
        isDivisor = false;
        break;
      }
    }
    if (isDivisor) {
      return i;
    }
  }
  return 1;
}
bool isPairwiseCoprime(const vector<int> &numList) {
  const size_t numListSize = numList.size();
  for (int i = 0; i < numListSize; i++) {
    for (int j = i + 1; j < numListSize; j++) {
      vector<int> divisorCheck;
      divisorCheck.push_back(numList[i]);
      divisorCheck.push_back(numList[j]);
      int gcd = getGCD(divisorCheck);
      if (gcd != 1) {
        return false;
      }
    }
  }
  return true;
}
string getResult(vector<int> &numList) {
  const size_t numListSize = numList.size();
  bool check = isPairwiseCoprime(numList);
  if (check) {
    return "pairwise coprime";
  }
  int gcd = getGCD(numList);
  if (gcd == 1) {
    return "setwise coprime";
  }
  return "not coprime";
}
int main() {
  int N;
  cin >> N;
  vector<int> numList;
  for (int i = 0; i < N; i++) {
    int Ai;
    cin >> Ai;
    numList.push_back(Ai);
  }
  string result = getResult(numList);
  cout << result << endl;
  return 0;
}
