n = int(input())
q = n // 1000 % 10
b = n // 100 % 10
s = n // 10 % 10
g = n // 1 % 10
x = q * 10 + b
y = s * 10 + g
print(x + y)
print("%.1f" % (x / y))
/**************************************************************
Problem: 1609
User: admin
Language: Python
Result: Accepted
Time:110 ms
Memory:34480 kb
****************************************************************/