GRANAMA - WA

I uploaded this solution for the problem
http://www.codechef.com/viewsolution/1581127

but it was WA. I wanted to know for which test case it was failing.

1

abb bc

Your program output NO, but AC answer is YES.