# import bisect

# from collections import Counter, deque

# import copy

# from heapq import heappush, heappop, heapify

# from fractions import gcd

# import itertools

# from operator import attrgetter, itemgetter

import math



import sys



# import numpy as np



ipti = sys.stdin.readline

MOD = 10 ** 9 + 7

INF = float('INF')

sys.setrecursionlimit(10 ** 5)



def main():

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



    for price in range(0, 10001):

        aa = math.floor(price * 0.08)

        bb = math.floor(price * 0.10)



        if a == aa and b == bb:

            print(price)

            sys.exit()



    print((-1))



if __name__ == '__main__':

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



ans = -1 # 答えが見つからなかった場合の-1を初期値にしておく



for price in range(10000):

    tax_a = int(price * 0.08)

    tax_b = int(price * 0.1)

    if tax_a == a and tax_b == b:

        ans = price

        break



print(ans)
# import bisect
# from collections import Counter, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
import math
import sys

# import numpy as np
ipti = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)


def main():
    a, b = list(map(int, ipti().split()))
    for price in range(0, 10001):
        aa = math.floor(price * 0.08)
        bb = math.floor(price * 0.10)
        if a == aa and b == bb:
            print(price)
            sys.exit()
    print((-1))


if __name__ == "__main__":
    main()

a, b = list(map(int, input().split()))
ans = -1  # 答えが見つからなかった場合の-1を初期値にしておく
for price in range(10000):
    tax_a = int(price * 0.08)
    tax_b = int(price * 0.1)
    if tax_a == a and tax_b == b:
        ans = price
        break
print(ans)

-# import bisect -# from collections import Counter, deque -# import copy -# from heapq import heappush, heappop, heapify -# from fractions import gcd -# import itertools -# from operator import attrgetter, itemgetter -import math -import sys - -# import numpy as np -ipti = sys.stdin.readline -MOD = 10**9 + 7 -INF = float("INF") -sys.setrecursionlimit(10**5) - - -def main(): -    a, b = list(map(int, ipti().split())) -    for price in range(0, 10001): -        aa = math.floor(price * 0.08) -        bb = math.floor(price * 0.10) -        if a == aa and b == bb: -            print(price) -            sys.exit() -    print((-1)) - - -if __name__ == "__main__": -    main() +a, b = list(map(int, input().split())) +ans = -1  # 答えが見つからなかった場合の-1を初期値にしておく +for price in range(10000): +    tax_a = int(price * 0.08) +    tax_b = int(price * 0.1) +    if tax_a == a and tax_b == b: +        ans = price +        break +print(ans)