function solution(s){
const pLength = s.split('p').length - 1 + s.split('P').length - 1;
const yLength = s.split('y').length - 1 + s.split('Y').length - 1;
return pLength === yLength ? true : false;
}
function numPY(s) {
return s.match(/p/ig).length == s.match(/y/ig).length;
}