The problem statement seems to have a minor mistake. In the "Note" section, and are both odd but the statement told even.