human
Check if it is possible to reach ( X , Y ) from ( 1 , 1 ) by given steps | Function to find the gcd of two numbers.
Base case.
Recurse.
Function to print the answer.
GCD of X and Y.
If GCD is power of 2.
Driver code.
Given X and Y.
Function call"
Solution in Python:
 Write me a code to check if it is possible to reach ( X , Y ) from ( 1 , 1 ) by given steps and the other steps required?
assistant
#Here is code to check if it is possible to reach ( X , Y ) from ( 1 , 1 ) by given steps and the other steps required.
 def gcd ( a , b ) :
	if ( a < b ) :
		t = a
		a = b
		b = t
	if ( a % b == 0 ) :
		return b
	return gcd ( b , a % b )
def printAnswer ( x , y ) :
	val = gcd ( x , y )
	if ( ( val & ( val - 1 ) ) == 0 ) :
		print ( " Yes " )
	else :
		print ( " No " )
if __name__ == " _ _ main _ _ " :
	x = 4
	y = 7
	printAnswer ( x , y )