TWOGRS Problem, stuck on finding the problem with my code

https://www.codechef.com/viewsolution/26760479

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::

1
0 4 30

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