from collections import Counter,defaultdict,deque

from bisect import bisect_left

import sys,math,itertools,pprint,fractions,time

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))



a,b = inpl()

res = INF

for i in range(1,10**6):

    if int(i*0.08) == a and int(i*0.1) == b:

        print(i)

        break

else:

    print((-1))
from collections import Counter,defaultdict,deque

from heapq import heappop,heappush,heapify

from bisect import bisect_left,bisect_right 

import sys,math,itertools,fractions,pprint

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))



a,b = inpl()

res = -1

for i in range(10**6):

    if int(i*0.08) == a and int(i*0.1) == b:

        res = i

        break

print(res)
from collections import Counter, defaultdict, deque
from bisect import bisect_left
import sys, math, itertools, pprint, fractions, time

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


a, b = inpl()
res = INF
for i in range(1, 10**6):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        break
else:
    print((-1))

from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
from bisect import bisect_left, bisect_right
import sys, math, itertools, fractions, pprint

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


a, b = inpl()
res = -1
for i in range(10**6):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        res = i
        break
print(res)

-from bisect import bisect_left -import sys, math, itertools, pprint, fractions, time +from heapq import heappop, heappush, heapify +from bisect import bisect_left, bisect_right +import sys, math, itertools, fractions, pprint -res = INF -for i in range(1, 10**6): +res = -1 +for i in range(10**6): -        print(i) +        res = i -else: -    print((-1)) +print(res)