#include <bits/stdc++.h>
using namespace std;
int n;
map<int, int> primes;
int sieve(int a) {
  int res = 0;
  for (int i = 2; i <= a * a; i++) {
    bool added = false;
    while (a % i == 0) {
      if (!added) {
        primes[i] += 1;
        added = true;
      }
      a /= i;
      res = max(res, primes[i]);
    }
  }
  return res;
}
int main() {
  cin >> n;
  int r;
  bool pairwise = true;
  bool setwise = false;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    r = sieve(a);
    if (r != 1) {
      pairwise = false;
    }
    if (i == n - 1 && r == n - 1) {
      setwise = true;
    }
  }
  if (pairwise)
    cout << "pairwise coprime";
  else if (setwise)
    cout << "setwirse coprime";
  else
    cout << "not coprime";
}
