human
Check if two piles of coins can be emptied by repeatedly removing 2 coins from a pile and 1 coin from the other | Function to check if two given piles can be emptied by repeatedly removing 2 coins from a pile and 1 coin from the other.
If maximum of A & B exceeds the twice of minimum of A & B.
Not possible to empty the piles.
If sum of both the coins is divisible by 3 , then print Yes.
Otherwise , print " No ".
Driver Code"
How can the above be solved in Python?

=====
Write me a code to check if two piles of coins can be emptied by repeatedly removing 2 coins from a pile and 1 coin from the other and the other steps required?
assistant
#Here is code to check if two piles of coins can be emptied by repeatedly removing 2 coins from a pile and 1 coin from the other and the other steps required.
 def canBeEmptied ( A , B ) :
	if ( max ( A , B ) > 2 * min ( A , B ) ) :
		print ( " No " )
		return
	if ( ( A + B ) % 3 == 0 ) :
		print ( " Yes " )
	else :
		print ( " No " )
if __name__ == ' _ _ main _ _ ' :
	A = 1
	B = 2
	canBeEmptied ( A , B )