Why one code gets AC while mine gets WA for question- PAYING UP

Here’s my solution, which is getting WA https://www.codechef.com/viewsolution/27377443
The solution which got accepted of some random guy is this: https://www.codechef.com/viewsolution/27374743

Solution is similar, since the hint has been discussed in a tutorial video of bitmasking by coding blocks. But what concerns me is, although we both implemented in same way, why his is getting AC while mine is getting WA.

You should give outpur as “Yes/No” …not “YES/NO” like this

Bro just print “Yes” and “No” and not “YES” and “NO”