import math



a, b = list(map(int, input().split()))



saitei = math.ceil(a/0.08)



for i in range(10000):

    if int((saitei+i)*0.1) == b and int((saitei+i)*0.08) == a:

        print((saitei+i))

        exit()



print((-1))
import math

a, b = list(map(int, input().split()))



mini_8 = a / 0.08

maxi_8 = mini_8 + 12.5

mini_8 = math.ceil(mini_8)

if maxi_8 - int(maxi_8) == 0:

    maxi_8 = int(maxi_8 - 1)

else:

    maxi_8 = int(maxi_8)



mini_10 = b / 0.1

maxi_10 = mini_10 + 9



for i in range(mini_8, maxi_8+1):

    if mini_10 <= i and i <= maxi_10:

        print(i)

        exit()

print((-1))
import math

a, b = list(map(int, input().split()))
saitei = math.ceil(a / 0.08)
for i in range(10000):
    if int((saitei + i) * 0.1) == b and int((saitei + i) * 0.08) == a:
        print((saitei + i))
        exit()
print((-1))

import math

a, b = list(map(int, input().split()))
mini_8 = a / 0.08
maxi_8 = mini_8 + 12.5
mini_8 = math.ceil(mini_8)
if maxi_8 - int(maxi_8) == 0:
    maxi_8 = int(maxi_8 - 1)
else:
    maxi_8 = int(maxi_8)
mini_10 = b / 0.1
maxi_10 = mini_10 + 9
for i in range(mini_8, maxi_8 + 1):
    if mini_10 <= i and i <= maxi_10:
        print(i)
        exit()
print((-1))

-saitei = math.ceil(a / 0.08) -for i in range(10000): -    if int((saitei + i) * 0.1) == b and int((saitei + i) * 0.08) == a: -        print((saitei + i)) +mini_8 = a / 0.08 +maxi_8 = mini_8 + 12.5 +mini_8 = math.ceil(mini_8) +if maxi_8 - int(maxi_8) == 0: +    maxi_8 = int(maxi_8 - 1) +else: +    maxi_8 = int(maxi_8) +mini_10 = b / 0.1 +maxi_10 = mini_10 + 9 +for i in range(mini_8, maxi_8 + 1): +    if mini_10 <= i and i <= maxi_10: +        print(i)