#include <bits/stdc++.h>
using namespace std;
int prime[1000000 + 1];
int D[1000000 + 1];
int used[1000000 + 1];
int main() {
  for (int i = 0; i <= 1000000; ++i) {
    prime[i] = 1;
    D[i] = i;
    used[i] = 0;
  }
  prime[0] = prime[1] = 0;
  int p = 2;
  while (p < sqrt(1000000)) {
    for (int i = p * 2; i <= 1000000; i += p) {
      prime[i] = 0;
      if (D[i] == i) {
        D[i] = p;
      }
    }
    for (int i = p + 1; i <= 1000000; ++i) {
      if (prime[i] == 1) {
        p = i;
        break;
      }
    }
  }
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int A;
    cin >> A;
    set<int> s;
    while (A != D[A]) {
      s.insert(D[A]);
      A = A / D[A];
    }
    s.insert(A);
    for (auto it = s.begin(); it != s.end(); ++it) {
      ++used[*it];
    }
  }
  bool pairwise = true;
  bool setwise = true;
  for (int i = 1; i <= 1000000; ++i) {
    if (used[i] >= 2) {
      pairwise = false;
    }
    if (used[i] >= n) {
      setwise = false;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
