atm practise problem showing runtime error

Below is my code for the ATM practise problem. I am getting runtime error for this. Do anyone has any idea?
plz help me…!

X = float(input())

Y = float(input())

if X < Y:

    if X%5 == 0:

	    Y = Y-X-0.5

        print('%.2f'%Y)

    else:
	    print('%.2f'%Y)

else:

	print('%.2f'%Y)

It is because the input you get is in the form of string .
so, do it somewhat like this ,

X,Y = input().split()
X = float(cash)
Y = float(bal)

OR

X,Y = map(float,input().split())