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

x = -1

for i in range(1,20000):

    if int(i*1.08)-i==A and int(i*1.1)-i==B:

        x = i

        break

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

a1 = A/0.08

if a1!=int(A/0.08):

    a1 = int(A/0.08)+1

else:

    a1 = int(A/0.08)

a2 = (A+1)/0.08

if a2!=int((A+1)/0.08):

    a2 = int((A+1)/0.08)+1

else:

    a2 = int((A+1)/0.08)

b1 = B/0.1

if b1!=int(B/0.1):

    b1 = int(B/0.1)+1

else:

    b1 = int(B/0.1)

b2 = (B+1)/0.1

if b2!=int((B+1)/0.1):

    b2 = int((B+1)/0.1)+1

else:

    b2 = int((B+1)/0.1)

X = list(range(a1,a2))

Y = list(range(b1,b2))

x = -1

for i in X:

    if i in Y:

        x = i

        break

print(x)
A, B = list(map(int, input().split()))
x = -1
for i in range(1, 20000):
    if int(i * 1.08) - i == A and int(i * 1.1) - i == B:
        x = i
        break
print(x)

A, B = list(map(int, input().split()))
a1 = A / 0.08
if a1 != int(A / 0.08):
    a1 = int(A / 0.08) + 1
else:
    a1 = int(A / 0.08)
a2 = (A + 1) / 0.08
if a2 != int((A + 1) / 0.08):
    a2 = int((A + 1) / 0.08) + 1
else:
    a2 = int((A + 1) / 0.08)
b1 = B / 0.1
if b1 != int(B / 0.1):
    b1 = int(B / 0.1) + 1
else:
    b1 = int(B / 0.1)
b2 = (B + 1) / 0.1
if b2 != int((B + 1) / 0.1):
    b2 = int((B + 1) / 0.1) + 1
else:
    b2 = int((B + 1) / 0.1)
X = list(range(a1, a2))
Y = list(range(b1, b2))
x = -1
for i in X:
    if i in Y:
        x = i
        break
print(x)

+a1 = A / 0.08 +if a1 != int(A / 0.08): +    a1 = int(A / 0.08) + 1 +else: +    a1 = int(A / 0.08) +a2 = (A + 1) / 0.08 +if a2 != int((A + 1) / 0.08): +    a2 = int((A + 1) / 0.08) + 1 +else: +    a2 = int((A + 1) / 0.08) +b1 = B / 0.1 +if b1 != int(B / 0.1): +    b1 = int(B / 0.1) + 1 +else: +    b1 = int(B / 0.1) +b2 = (B + 1) / 0.1 +if b2 != int((B + 1) / 0.1): +    b2 = int((B + 1) / 0.1) + 1 +else: +    b2 = int((B + 1) / 0.1) +X = list(range(a1, a2)) +Y = list(range(b1, b2)) -for i in range(1, 20000): -    if int(i * 1.08) - i == A and int(i * 1.1) - i == B: +for i in X: +    if i in Y: