#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (y > x) {
    swap(x, y);
  }
  while (y != 0) {
    long long r = x % y;
    x = y;
    y = r;
  }
  return x;
}
bool ab(long long x) {
  bool ans = true;
  long long y = pow(x, 0.5);
  for (int i = 2; i <= y; i++) {
    if (x % i == 0 && x / i != 1) {
      ans = false;
    }
  }
  if (ans)
    return true;
  else
    return false;
}
int main() {
  long long n;
  cin >> n;
  long long data[n];
  bool p = true;
  bool point = true;
  for (long long i = 0; i < n; i++) cin >> data[i];
  for (long long i = 2; i <= 1000001; i++) {
    if (i % 2 == 0 && i != 2) continue;
    if (i % 3 == 0 && i != 3) continue;
    if (i % 5 == 0 && i != 5) continue;
    if (i % 7 == 0 && i != 7) continue;
    if (i % 11 == 0 && i != 11) continue;
    if (i % 13 == 0 && i != 15) continue;
    if (ab(i) == false) continue;
    long long count = 0;
    for (long long j = 0; j < n; j++) {
      if (data[j] % i == 0) count++;
    }
    if (count == n) point = false;
    if (count >= 2) {
      p = false;
    }
  }
  if (p == true) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (point == true) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
