#include <bits/stdc++.h>
using namespace std;
long long nextS(long long i) {
  long long next = i + 1;
  while (next <= 1000000) {
    bool flag = true;
    for (long long j = 2; j < i; ++j) {
      if (next % j == 0) {
        flag = false;
        break;
      }
    }
    if (flag) {
      return next;
    }
    next++;
  }
  return next;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> nums(n);
  long long max = 0;
  for (long long i = 0; i < n; i++) {
    long long temp;
    cin >> temp;
    nums.at(i) = temp;
    if (max < temp) max = temp;
  }
  string ans = "not coprime";
  bool isSet = true;
  bool isPair = true;
  long long nextSosu = 2;
  while (nextSosu <= max) {
    if (isSet) {
      bool flagA = false;
      bool flagB = false;
      for (long long i = 0; i < n; i++) {
        if (nums.at(i) % nextSosu == 0) {
          flagA = true;
        } else {
          flagB = true;
        }
        if (flagA && flagB) break;
      }
      if (flagA && !flagB) {
        isSet = false;
      }
    }
    if (isPair) {
      for (long long i = 0; i < n - 1; i++) {
        if ((nums.at(i) % nextSosu == 0) && (nums.at(i + 1) % nextSosu == 0)) {
          isPair = false;
          break;
        }
      }
    }
    if (!isSet && isPair) break;
    nextSosu = nextS(nextSosu);
  }
  if (isSet) ans = "setwise coprime";
  if (isPair) ans = "pairwise coprime";
  cout << ans << endl;
  return 0;
}
