Function to check whether it is possible or not to move from ( 0 , 0 ) to ( x , y ) in exactly n steps
< ? php function Arrive ( $ a , $ b , $ n ) { if ( $ n >= abs ( $ a ) + abs ( $ b ) and ( $ n - ( abs ( $ a ) + abs ( $ b ) ) ) % 2 == 0 ) return true ; return false ; }