Function to check whether it is possible or not to move from ( 0 , 0 ) to ( x , y ) in exactly n steps
static bool Arrive ( int a , int b , int n ) { if ( n >= Math . Abs ( a ) + Math . Abs ( b ) && ( n - ( Math . Abs ( a ) + Math . Abs ( b ) ) ) % 2 == 0 ) return true ; return false ; }