import math

import numpy as np

a,b=[int(v) for v in input().split()]



min_8=math.ceil(a/0.08)

max_8=(a+1)//0.08



min_10=math.ceil(b/0.1)

max_10=(b+1)//0.1





range_8 = np.arange(min_8,max_8+1).astype(int)

range_10 = np.arange(min_10,max_10+1).astype(int)



try:

    print((min(np.intersect1d(range_8,range_10))))

except:

    print((-1))   
import math



import numpy as np



a, b = [int(v) for v in input().split()]





try:

    print((min(np.intersect1d(np.arange(math.ceil(a/0.08), (a+1) //0.08+ 1).astype(int), np.arange(math.ceil(b/0.1), (b+1)//0.1 + 1).astype(int)))))



except:

    print((-1))

import math
import numpy as np

a, b = [int(v) for v in input().split()]
min_8 = math.ceil(a / 0.08)
max_8 = (a + 1) // 0.08
min_10 = math.ceil(b / 0.1)
max_10 = (b + 1) // 0.1
range_8 = np.arange(min_8, max_8 + 1).astype(int)
range_10 = np.arange(min_10, max_10 + 1).astype(int)
try:
    print((min(np.intersect1d(range_8, range_10))))
except:
    print((-1))

import math
import numpy as np

a, b = [int(v) for v in input().split()]
try:
    print(
        (
            min(
                np.intersect1d(
                    np.arange(math.ceil(a / 0.08), (a + 1) // 0.08 + 1).astype(int),
                    np.arange(math.ceil(b / 0.1), (b + 1) // 0.1 + 1).astype(int),
                )
            )
        )
    )
except:
    print((-1))

-min_8 = math.ceil(a / 0.08) -max_8 = (a + 1) // 0.08 -min_10 = math.ceil(b / 0.1) -max_10 = (b + 1) // 0.1 -range_8 = np.arange(min_8, max_8 + 1).astype(int) -range_10 = np.arange(min_10, max_10 + 1).astype(int) -    print((min(np.intersect1d(range_8, range_10)))) +    print( +        ( +            min( +                np.intersect1d( +                    np.arange(math.ceil(a / 0.08), (a + 1) // 0.08 + 1).astype(int), +                    np.arange(math.ceil(b / 0.1), (b + 1) // 0.1 + 1).astype(int), +                ) +            ) +        ) +    )