#include <string>
#include <iostream>
using namespace std;
bool solution(string s)
{
bool answer = true;
int i, length = s.length();
int p_count = 0, y_count = 0;
// [실행] 버튼을 누르면 출력 값을 볼 수 있습니다.
//cout << "Hello Cpp" << endl;
for(i = 0; i < length; i++)
{
if(s[i] == 'p' || s[i] == 'P')
{
p_count++;
}
else if(s[i] == 'y' || s[i] == 'Y')
{
y_count++;
}
else
{
;
}
}
if(p_count == y_count)
{
answer = true;
}
else
{
answer = false;
}
return answer;
}