A = float(input())
B = float(input())

promedio = (3.5 * A + 7.5 * B) / 11.0

print("PROMEDIO = %.5f\n" % promedio)
A = float(input())
B = float(input())

promedio = (3.5 * A + 7.5 * B) / 11.0

print("PROMEDIO = %.5f\n" % promedio)