import math

import sys



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



A = math.floor(a / 0.08)

B = math.floor(b / 0.10)



for i in range(1,1251):

    if math.floor(i * 0.08) == a and math.floor(i * 0.10) == b:

        print(i)

        sys.exit()

print('-1')

import math

import sys



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



for i in range(1,1251):

	tax_a = math.floor(i * 0.08)

	tax_b = math.floor(i * 0.1)

	if tax_a == a and tax_b == b:

		print(i)

		sys.exit()

print((-1))

import math
import sys

a, b = list(map(int, input().split()))
A = math.floor(a / 0.08)
B = math.floor(b / 0.10)
for i in range(1, 1251):
    if math.floor(i * 0.08) == a and math.floor(i * 0.10) == b:
        print(i)
        sys.exit()
print("-1")

import math
import sys

a, b = list(map(int, input().split()))
for i in range(1, 1251):
    tax_a = math.floor(i * 0.08)
    tax_b = math.floor(i * 0.1)
    if tax_a == a and tax_b == b:
        print(i)
        sys.exit()
print((-1))

-A = math.floor(a / 0.08) -B = math.floor(b / 0.10) -    if math.floor(i * 0.08) == a and math.floor(i * 0.10) == b: +    tax_a = math.floor(i * 0.08) +    tax_b = math.floor(i * 0.1) +    if tax_a == a and tax_b == b: -print("-1") +print((-1))