x = float(input())
if x < -2 :
y = x
elif 1 < x <= 3:
y = 5
elif x >= 50:
y = 5 * x
else:
y = 7
print(y)
x = float(input())
if x < -2 :
y = x
elif 1 < x <= 3:
y = 5
elif x >= 50:
y = 5 * x
else:
y = 7
print(y)