text: Check if it is possible to make x and y zero at same time with given operation | C # program of the above approach ; Function to check if it is possible to make x and y can become 0 at same time ; Check the given conditions ; Driver Code ; Function Call
code: using System ; class GFG { static void canBeReduced ( int x , int y ) { int maxi = Math . Max ( x , y ) ; int mini = Math . Min ( x , y ) ; if ( ( ( x + y ) % 3 ) == 0 && maxi <= 2 * mini ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } static void Main ( ) { int x = 6 , y = 9 ; canBeReduced ( x , y ) ; } }