TWOGRS Problem, stuck on finding the problem with my code

I ran many test cases but can’t seem to find where does this code fail.
Would love some help guys!

Yeah, that problem came in last contest. I was also frustrated after failing every time.

Please check out the following test case::

0 4 30

If (a+c)%2 == 0 and then…
a = 0 and b > 1 : ans = YES