Check if X and Y can be made zero by using given operation any number of times | Function to check if X and Y can be made equal to zero by using given operation any number of times ; Check for the two conditions ; Driver code
function ifPossible ( X , Y ) { if ( X > Y ) { var temp = X ; X = Y ; Y = temp ; } if ( ( X + Y ) % 5 == 0 && 3 * X >= 2 * Y ) document . write ( " " ) ; else document . write ( " " ) ; } var X = 33 , Y = 27 ; ifPossible ( X , Y ) ;