import sys

import math



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



A, B = lr()

answer = -1

for x in range(1001):

    if math.floor(x * 0.08) == A and math.floor(x * 0.1) == B:

        answer = x

        break



print(answer)

# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



A, B = lr()

for x in range(1, 10001):

    if x * 8 // 100 == A and x * 10 // 100 == B:

        print(x); exit()



print((-1))
import sys
import math

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
A, B = lr()
answer = -1
for x in range(1001):
    if math.floor(x * 0.08) == A and math.floor(x * 0.1) == B:
        answer = x
        break
print(answer)

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
A, B = lr()
for x in range(1, 10001):
    if x * 8 // 100 == A and x * 10 // 100 == B:
        print(x)
        exit()
print((-1))

+# coding: utf-8 -import math -answer = -1 -for x in range(1001): -    if math.floor(x * 0.08) == A and math.floor(x * 0.1) == B: -        answer = x -        break -print(answer) +for x in range(1, 10001): +    if x * 8 // 100 == A and x * 10 // 100 == B: +        print(x) +        exit() +print((-1))