# -*- coding: utf-8 -*-

"""

Spyderエディタ



これは一時的なスクリプトファイルです。

"""

import math



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



alpha = []

beta = []



for x in range(math.floor(a/0.08), math.floor(a/0.05)):

    if math.floor(x * 0.08) == a:

        alpha.append(x)

for y in range(math.floor(b/0.10), math.floor(b/0.05)):

    if math.floor(y * 0.1) == b:

        beta.append(y)



if min(alpha) in beta:

    print((min(alpha)))

elif min(beta) in alpha:

    print((min(beta)))

else:

    print("-1")    

import math

A,B = (int(x) for x in input().split())

A1 = math.ceil(A/0.08)

A2 = math.ceil((A+1)/0.08)



"""if float((A+1)/0.08).is_integer() == True:

    A2 = math.floor((A+1)/0.08)

else:

    A2 = math.floor((A+1)/0.08) + 1

"""

B1 = math.ceil(B/0.1)

B2 = math.ceil((B+1)/0.1)



"""if float((B+1)/0.1).is_integer() == True:

    B2 = math.floor((B+1)/0.1)

else:

    B2 = math.floor((B+1)/0.1) + 1

"""

a = list(range(A1, A2))

b = list(range(B1, B2))

c = set(a) & set(b)

if len(c) == 0:

          print((-1))

else:

          print((min(c)))
# -*- coding: utf-8 -*-
"""
Spyderエディタ
これは一時的なスクリプトファイルです。
"""
import math

a, b = list(map(int, input().split()))
alpha = []
beta = []
for x in range(math.floor(a / 0.08), math.floor(a / 0.05)):
    if math.floor(x * 0.08) == a:
        alpha.append(x)
for y in range(math.floor(b / 0.10), math.floor(b / 0.05)):
    if math.floor(y * 0.1) == b:
        beta.append(y)
if min(alpha) in beta:
    print((min(alpha)))
elif min(beta) in alpha:
    print((min(beta)))
else:
    print("-1")

import math

A, B = (int(x) for x in input().split())
A1 = math.ceil(A / 0.08)
A2 = math.ceil((A + 1) / 0.08)
"""if float((A+1)/0.08).is_integer() == True:
    A2 = math.floor((A+1)/0.08)
else:
    A2 = math.floor((A+1)/0.08) + 1
"""
B1 = math.ceil(B / 0.1)
B2 = math.ceil((B + 1) / 0.1)
"""if float((B+1)/0.1).is_integer() == True:
    B2 = math.floor((B+1)/0.1)
else:
    B2 = math.floor((B+1)/0.1) + 1
"""
a = list(range(A1, A2))
b = list(range(B1, B2))
c = set(a) & set(b)
if len(c) == 0:
    print((-1))
else:
    print((min(c)))

-# -*- coding: utf-8 -*- -""" -Spyderエディタ -これは一時的なスクリプトファイルです。 -""" -a, b = list(map(int, input().split())) -alpha = [] -beta = [] -for x in range(math.floor(a / 0.08), math.floor(a / 0.05)): -    if math.floor(x * 0.08) == a: -        alpha.append(x) -for y in range(math.floor(b / 0.10), math.floor(b / 0.05)): -    if math.floor(y * 0.1) == b: -        beta.append(y) -if min(alpha) in beta: -    print((min(alpha))) -elif min(beta) in alpha: -    print((min(beta))) +A, B = (int(x) for x in input().split()) +A1 = math.ceil(A / 0.08) +A2 = math.ceil((A + 1) / 0.08) +"""if float((A+1)/0.08).is_integer() == True: +    A2 = math.floor((A+1)/0.08) -    print("-1") +    A2 = math.floor((A+1)/0.08) + 1 +""" +B1 = math.ceil(B / 0.1) +B2 = math.ceil((B + 1) / 0.1) +"""if float((B+1)/0.1).is_integer() == True: +    B2 = math.floor((B+1)/0.1) +else: +    B2 = math.floor((B+1)/0.1) + 1 +""" +a = list(range(A1, A2)) +b = list(range(B1, B2)) +c = set(a) & set(b) +if len(c) == 0: +    print((-1)) +else: +    print((min(c)))