It seems that something is wrong with round #196 div1 D problem.
This problem's statement and samples are inconsistent at the moment. According to the statement, the answer is YES or NO. But the first sample's output is 5. It was correct till today's afternoon when eventually sample tests' output changed and my solution(which outputs YES or NO only) started receiving WA1(some other people have the same problem).
I hope it will be fixed.
Thanks in regards.
This is my fault, I was testing something within Polygon and accidentally committed a modified solution. Just fixed it. Sorry for the inconvenience caused!
I rejudged the WA1 runs that were submitted during this period. Please tell me if I missed any (if it really matters).