Donghyeok stands at the origin (0,0) of a plane of infinite size.
He moves in numbered stages and wants to arrive at the point (x,y). Stage numbers start at 0 and grow by 1.
At stage k he picks one of four directions, right (x increases), left (x decreases), up (y increases), or down (y decreases), and then moves exactly 3k in that direction. He cannot skip a stage.
He performs as many stages as he wants and then stops. Stopping at the origin without performing a single stage is allowed.
Given x and y, write a program that decides whether (x,y) can be reached from (0,0).