#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
bool IsPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
vector<long long> divisor(long long n) {
  vector<long long> ret;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
    }
  }
  return (ret);
}
int main() {
  long long n, b[1000000 + 2] = {};
  cin >> n;
  bool TF = true, TF2 = false;
  for (long long i = 0; i < long long(n); i++) {
    int num;
    cin >> num;
    vector<long long> a = divisor(num);
    if (TF)
      for (long long j = 1; j <= long long(a.size() - 1); j++) {
        if (b[a[j]] == 0)
          b[a[j]]++;
        else
          TF = false;
      }
    if (!TF2)
      if (IsPrime(num)) TF2 = true;
    if (!TF && TF2) break;
  }
  if (TF)
    cout << "pairwise coprime" << endl;
  else if (TF2) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
