import math

A, B = list(map(int, input().split()))

for i in range(1,1010):

    a, b = i*0.08, i*0.1

    if math.floor(a) == A and math.floor(b) == B:

        print(i)

        break



    if i == 1009:

        print((-1))
import math

A, B = list(map(int, input().split()))

b1 = B*10

b2 = b1 + 10



for i in range(b1, b2):

    if math.floor(i*0.08) == A:

        print(i)

        break



    if i == b2-1:

        print((-1))
import math

A, B = list(map(int, input().split()))
for i in range(1, 1010):
    a, b = i * 0.08, i * 0.1
    if math.floor(a) == A and math.floor(b) == B:
        print(i)
        break
    if i == 1009:
        print((-1))

import math

A, B = list(map(int, input().split()))
b1 = B * 10
b2 = b1 + 10
for i in range(b1, b2):
    if math.floor(i * 0.08) == A:
        print(i)
        break
    if i == b2 - 1:
        print((-1))

-for i in range(1, 1010): -    a, b = i * 0.08, i * 0.1 -    if math.floor(a) == A and math.floor(b) == B: +b1 = B * 10 +b2 = b1 + 10 +for i in range(b1, b2): +    if math.floor(i * 0.08) == A: -    if i == 1009: +    if i == b2 - 1: