CodeEff/ECCO huggingface dataset:
# Original solution
# 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()

# Optimized solution
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)
# Original solution
import math
A ,B = list(map(int,input().split()))
 
def problem_koganemaru(A,B):  
  for price in range(10000):
    if math.floor(price*0.08) == A and math.floor(price*0.1) == B:
      return price
  return -1
 
print((problem_koganemaru(A,B)))

# Optimized solution
import math
A,B = list(map(int,input().split()))
def problem_gksn(A, B):
  x_min = math.ceil(A / (0.08))
  x_max = math.floor((A+1)/0.08)
  y_min = math.ceil(B / (0.10))
  y_max = math.floor((B+1) / (0.10))
  # print(x_min,x_max,y_min,y_max)
  if max(x_min, y_min) < min(x_max, y_max):
    return max(x_min, y_min)
  else:
    return -1
print((problem_gksn(A,B)))
# {[ } ]
# Original solution
#Tax Increase
import math
a, b = list(map(int, input().split()))
for i in range(10000):
    if a == math.floor(i*0.08) and b == math.floor(i*0.1):
        print(i)
        break
else:
    print((-1))

# Optimized solution
#Tax Increase
import math
a, b = list(map(int, input().split()))
for i in range(1251):
    if a == math.floor(i*0.08) and b == math.floor(i*0.1):
        print(i)
        break
else:
    print((-1))
# Original solution
import math

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

saitei = math.ceil(a/0.08)

for i in range(10000):
    if int((saitei+i)*0.1) == b and int((saitei+i)*0.08) == a:
        print((saitei+i))
        exit()

print((-1))

# Optimized solution
import math
a, b = list(map(int, input().split()))

mini_8 = a / 0.08
maxi_8 = mini_8 + 12.5
mini_8 = math.ceil(mini_8)
if maxi_8 - int(maxi_8) == 0:
    maxi_8 = int(maxi_8 - 1)
else:
    maxi_8 = int(maxi_8)

mini_10 = b / 0.1
maxi_10 = mini_10 + 9

for i in range(mini_8, maxi_8+1):
    if mini_10 <= i and i <= maxi_10:
        print(i)
        exit()
print((-1))
# Original solution
a,b=list(map(int,input().split()))
x=0
for i in range(2000):
  if x == 0 and int(i*0.08) == a and int(i*0.10) == b:
    print(i)
    x=1
  if x == 0 and i == 1299:
    print("-1")


# Optimized solution
a,b=list(map(int,input().split()))
x=0
for i in range(1251):
  if x == 0 and int(i*0.08) == a and int(i*0.10) == b:
    print(i)
    x=1
  if x == 0 and i == 1250:
    print("-1")
# Original solution
A, B = list(map(int, input().split()))

for x in range(1, 10**5):
    if x*8//100 == A and x*10//100 == B:
        print(x)
        break
else:
    print((-1))


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

L1, R1 = -(-(100*A) // 8), -(-(100*(A+1)) // 8) - 1
L2, R2 = -(-(100*B) // 10), -(-(100*(B+1)) // 10) - 1
L = max(L1, L2)
R = min(R1, R2)

if L <= R:
    print(L)
else:
    print((-1))
# Original solution
import fractions
import sys
A,B=list(map(int,input().split()))

for i in range(1,1009):
    if(int(i*0.08) == A and int(i*0.1)==B):
        print(i)
        sys.exit()
print((-1))

# Optimized solution
from math import floor
def myAnswer(A:int,B:int) -> int:
   price = 1
   while True:
      if(floor(price*0.08)==A and floor(price*0.1)==B):
         return price
      elif(floor(price*0.08)>A or floor(price*0.1)>B):
         return -1
      else:
         price+=1
   

def modelAnswer():
   tmp=1
def main():
   A,B = list(map(int,input().split()))
   print((myAnswer(A,B)))

if __name__ == '__main__':
   main()
# Original solution
a, b = list(map(int, input().split()))

for i in range(10000):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit(0)

else :
        print((-1))



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

for i in range(1001):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        break

else:print((-1))
# Original solution
def main():
    a,b = list(map(int,input().split()))
    for x in range(1,10001):
        x_a = int(x * 0.08)
        x_b = int(x * 0.1)
        if x_a == a and x_b == b:
            print(x)
            return
    print((-1))
if __name__=='__main__':
    main()


# Optimized solution
import math
a,b = list(map(int,input().split()))

for i in range(1,2000):
    tax8 = math.floor(i*0.08)
    tax1 = math.floor(i*0.1)
    if a == tax8 and b == tax1:
        print(i)
        exit()
print((-1))
# Original solution
A, B = list(map(int, input().split()))
for i in range(10101):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        exit()
print((-1))


# Optimized solution
A, B = list(map(int, input().split()))
for i in range(1011):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        exit()
print((-1))
# Original solution
import math
A, B=list(map(int,input().split()))
for i in range(10000):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        print(i)
        exit()
print((-1))

# Optimized solution
import math
A, B=list(map(int,input().split()))
for i in range(1001):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        print(i)
        exit()
print((-1))
# Original solution
import sys
import math
a,b=list(map(int,input().split()))
for i in range(10*b,15*b):
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    print(i)
    sys.exit()
print((-1))

# Optimized solution
a,b=list(map(int,input().split()))
for i in range(10*b,15*b):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    exit()
print((-1))
# Original solution
import math

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

i = math.floor(A / 0.08)
while i < 10001:
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        break
    i += 1
else:
    print((-1))


# Optimized solution
import math

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

for i in range( 10001 ):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        break
else:
    print((-1))
# Original solution
import math
a, b = list(map(int, input().split()))

for i in range(1, 10**5):
    if math.floor(i*0.08) == a and  math.floor(i*0.1) == b:
        print(i)
        exit()

print((-1))

# Optimized solution
from math import floor
a, b = list(map(int, input().split()))

for i in range(1,100001):
    if floor(0.08*i) == a and floor(0.1*i) == b:
        print(i)
        exit()

print((-1))
# Original solution
a,b=list(map(int,input().split()))
ans=-1
for i in range(1,10**4):
    if ((i*10)//100)==b and ((i*8)//100)==a:
        ans=i
        break
print(ans)

# Optimized solution
def check(x):
    if (x*10)//100>=b and (x*8)//100>=a: return True
    else: return False

a,b=list(map(int,input().split()))
l=0 
r=10**9
while(l<r):
    mid=(l+r)//2
    if check(mid):r=mid
    else: l=mid+1
print((l if (l*10)//100==b and (l*8)//100==a else -1))
# Original solution
A, B = list(map(int, input().split()))

for i in range(1, 10**5):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()

print((-1))

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

for i in range(100000):
    if (i * 8) // 100 == A and (i * 10) // 100 == B:
        print(i)
        exit()

print((-1))
# Original solution
import math as m

a, b = list(map(int, input().split()))
cost = -1
flg = 0

while flg == 0 and cost < 10 ** 6 / 1.5:
    cost += 1
    aAns = m.floor(cost * 0.08)
    bAns = m.floor(cost * 0.1)
    if aAns == a and bAns == b:
        flg = 1

print((cost if flg == 1 else -1))


# Optimized solution
import math as m

a, b = list(map(int, input().split()))
cost = -1
flg = 0

while flg == 0 and cost < 10 ** 6 / 1.5:
    cost += 1
    aAns = m.floor(cost * 0.08)
    bAns = m.floor(cost * 0.1)
    if aAns == a and bAns == b:
        flg = 1
    if a - aAns < 0 or b - bAns < 0:
        break

print((cost if flg == 1 else -1))
# Original solution
def main():
    #from sys import stdin, setrecursionlimit
    #setrecursionlimit(10**9)
    #r = input()
    #n = int(input())
    #a, b = map(int, input().split())
    #s, y = input().split()
    #a = input().split()
    #a = [int(input()) for i in range(n)]
    #a = list(map(int, input().split()))
    #a = [list(map(int, input().split())) for i in range(n)]
    #a = [int(s) - 1 for s in input().split()]
    #l=[int(input()) for _ in range(int(input()))]
    #res = 0
    from math import floor
    a, b = list(map(int, input().split()))
    ax = 0
    bx = 0
    for i in range(1,1500):
        ax = floor(i * 0.08)
        bx = floor(i * 0.1)
        if ax == a and bx == b:
            print(i)
            return 0
    print((-1))

if __name__ == '__main__':
    main()



# Optimized solution
def main():
    a,b = list(map(int,input().split()))

    ax,bx = 0,0
    from math import floor
    # 100/0.08 = 1250
    for i in range(1,1251):
        ax = floor(i*0.08)
        bx = floor(i*0.1)
        if ax == a and bx == b:
            print(i)
            return 0
    print((-1)) 

if __name__ == '__main__':
    main()
# Original solution
A, B = list(map(int, input().split(' ')))
rst = -1
for i in range(1, 100000):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        rst = i
        break
print(rst)

# Optimized solution
A, B = list(map(int, input().split(' ')))
for i in range(1, 1500):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        break
else:
    print((-1))
# Original solution
A, B = list(map(int, input().split(' ')))
for i in range(1, 1010):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        break
else:
    print((-1))

# Optimized solution
A, B = list(map(int, input().split(' ')))
for i in range(1, 1500):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        break
else:
    print((-1))
# Original solution
import math

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

for i in range(b+1,1001):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans = i
        break
else:
    ans = -1
print(ans)

# Optimized solution
a, b = list(map(int,input().split()))
if b * 10 <= (a * 25 + 24) // 2 and -(-a * 25 // 2) < (b + 1) * 10:
    print((max(-(-a*25//2), b * 10)))
else:
    print((-1))
# Original solution
from math import floor

def main():
    a, b = list(map(int, input().split()))
    
    ans = -1
    for i in range(10000):
        if floor(i * 0.08) == a and floor(i * 0.1) == b:
            ans = i
            break
    print(ans)

if __name__ == "__main__":
    main()

# Optimized solution
from math import floor

def main():
    a, b = list(map(int, input().split()))
    
    ans = -1
    for i in range(1, 1001):
        if floor(i * 0.08) == a and floor(i * 0.1) == b:
            ans = i
            break
    print(ans)

if __name__ == "__main__":
    main()
# Original solution
import sys
input = sys.stdin.readline

def I(): return int(eval(input()))
def MI(): return list(map(int, input().split()))
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    a,b=MI()
    ans=-1
    for i in range(10000):
        aa=int(i*0.08)
        bb=i//10
        if a==aa and b==bb:
            ans=i
            break
    print(ans)

main()


# Optimized solution
import sys
input = sys.stdin.readline

def I(): return int(eval(input()))
def MI(): return list(map(int, input().split()))
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    ans=-1
    
    A,B=MI()
    for i in range(10000):
        a=int(i*0.08)
        b=int(i*0.1)
        
        if a==A and b==B:
            ans=i
            break
        
    print(ans)


main()
# Original solution
def main():
    A, B = list(map(int, input().split()))

    for x in range(10000):
        if int(x * 0.08) == A and int(x * 0.1) == B:
            print(x)
            return

    print((-1))


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())


# Optimized solution
def main():
    from math import ceil

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

    la, ra = ceil(A * 12.5), ceil((A + 1) * 12.5)
    lb, rb = B * 10, (B + 1) * 10

    L, R = max(la, lb), min(ra, rb)  # [L,R)

    if L >= R:
        print((-1))
        return

    print(L)


if __name__ == '__main__':
    main()
# Original solution
# -*- coding: utf-8 -*-

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

n = 0

while n<11000:
 n+=1
 x1 = int(n * .08)
 x2 = int(n * .1)
 if A == x1 and B == x2:
     print(n)
     break
else:
    print((-1))

# Optimized solution
import math

A, B = list(map(int, input().split()))
n = 0
while n<11000:
 n+=1
 if A == math.floor(n*.08) and B == math.floor(n*.1):
     print(n)
     break
else:
    print((-1))
# Original solution
a, b = list(map(int, input().split()))

import math
aS = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

flag = True
for i in range(10000):
    if aS <= i < al and bs <= i < bl:
        print(i)
        flag = False
        break
if flag:
    print((-1))


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

import math
flag = True
for i in range(1009):
    if math.floor(i * 0.08) == a and math.floor(i * 0.10) == b:
        print(i)
        flag = False
        break
if flag:
    print((-1))
# Original solution
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)


# Optimized solution
# 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))
# Original solution
# 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))

# Optimized solution
# 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()
mi8 = -(-A*25//2)
ma8 = -(-(A+1)*25//2)
mi10 = -(-B*10)
ma10 = -(-(B+1)*10)
mi = max(mi8, mi10)
ma = min(ma8, ma10)
if mi >= ma:
    answer = -1
else:
    answer = mi

print(answer)
# 58
# Original solution
a, b = list(map(int, input().split()))

ans = -1
for i in range(1300):
    if int(i*0.08) == a and int(i*0.1) == b:
        ans = i
        break
 
print(ans)

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

ans = -1
for i in range(13,1250):
    if int(i*0.08) == a and int(i*0.1) == b:
        ans = i
        break
 
print(ans)
# Original solution
A, B = list(map(int, input().split()))
for i in range(1,1001):
    a = int(i*0.08)
    b = int(i*0.1)
    if A==a and B==b:
        print(i)
        break
else:
    print((-1))

# Optimized solution
A, B = list(map(int, input().split()))
for i in range(1,1001):
    if A== int(i*0.08) and B== int(i*0.1):
        print(i)
        break
else:
    print((-1))
# Original solution
import math
A, B = list(map(int, input().split()))
for i in range(1,1010):
    a, b = i*0.08, i*0.1
    if math.floor(a) == A and math.floor(b) == B:
        print(i)
        break

    if i == 1009:
        print((-1))

# Optimized solution
import math
A, B = list(map(int, input().split()))
b1 = B*10
b2 = b1 + 10

for i in range(b1, b2):
    if math.floor(i*0.08) == A:
        print(i)
        break

    if i == b2-1:
        print((-1))
# Original solution
from math import floor
A, B = list(map(int,input().split()))
for k in range(1,20000):
    if floor(k*0.08) == A and floor(k*0.1) == B:
        print(k)
        exit(0)
print((-1))


# Optimized solution
A, B = list(map(int,input().split()))
for k in range(1,20000):
    if int(k*1.08) == A+k and int(k*1.10) == B+k:
        print(k)
        exit(0)
print((-1))
# Original solution
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = il()
    for n in range(1100):
        if int(n*0.08) == A and int(n*0.1) == B:
            print(n)
            exit()
    else:
        print((-1))



if __name__ == '__main__':
    main()


# Optimized solution
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = il()
    for n in range(1010):
        if int(n*0.08) == A and int(n*0.1) == B:
            print(n)
            exit()
    else:
        print((-1))



if __name__ == '__main__':
    main()
# Original solution
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)

# Optimized solution
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)
# Original solution
A,B = list(map(int,input().split()))
a1 = A/0.08
a2 = (A+1)/0.08
X = []
for i in range(13,1263):
    if a1<=i<a2:
        X.append(i)
b1 = B/0.1
b2 = (B+1)/0.1
x = -1
for y in X:
    if b1<=y<b2:
        x = y
        break
print(x)

# Optimized solution
A,B = list(map(int,input().split()))
flag = 0
for i in range(1,1001):
    if int(i*0.08)==A and int(i*0.1)==B:
        ans = i
        flag = 1
        break
if flag==0:
    print((-1))
else:
    print(ans)
# Original solution
A,B=list(map(int,input().split()))
for i in range(20000):
    if ((i*8)+0.000005)//100==A and ((i*10)+0.000005)//100==B:
        print(i)
        exit()
    else:
        pass
print((-1))

# Optimized solution
A,B=list(map(int,input().split()))
for i in range(20000):
    if (i*8)//100==A and (i*10)//100==B:
        print(i)
        exit()
    else:
        pass
print((-1))
# Original solution
a,b = list(map(int,input().split()))
v = 1
while True:
    if (v*0.08)//1 == a and (v*0.1)//1 == b:
        ans = v
        break
    v += 1
    if v > 10100:
        ans = -1
        break
print(ans)


# Optimized solution
a,b = list(map(int,input().split()))
v = 1
for v in range(1,1010):
    if (v*0.08)//1 == a and (v*0.1)//1 == b:
        ans = v
        break
else:
    ans = -1
print(ans)
# Original solution
import math

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

ans = -1
for i in range(1, 10001):
    tax_8 = math.floor(i * 0.08)
    tax_10 = math.floor(i * 0.10)
    if tax_8 == A and tax_10 == B:
        ans = i
        break

print(ans)

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

for i in range(1, 10001):
    if int(i * 1.08) - i == A and int(i * 1.1) - i == B:
        print(i)
        exit()

print((-1))
# Original solution
A, B = list(map(int, input().split()))
for i in range(500000):
    if int(i * 0.08) == A and int(i*0.10) == B:
        print(i)
        exit()
print((-1))


# Optimized solution
A, B = list(map(int, input().split()))
for i in range(100000):
    if int(i*0.08) == A and int(i*0.10) == B:
        print(i)
        exit()
print((-1))
# Original solution
a,b=list(map(int,input().split()));print((([i for i in range(10**6)if(i//12.5==a)*i//10==b]+[-1])[0]))

# Optimized solution
a,b=list(map(int,input().split()));l=max(0--a*25//2,b*10);print((l*(-~a*25//2>l<-~b*10)or-1))
# Original solution
a,b=list(map(int,input().split()));l=max(0--a*25//2,b*10);print((l*(-~a*25//2>l<-~b*10)or-1))

# Optimized solution
a,b=list(map(int,input().split()));l=max(0--a*25//2,b*10);print((l*(~a*25//2<-l>~b*10)or-1))
# Original solution
a,b=list(map(int,input().split()));l=max(0--a*25//2,b*10);print((l*(~a*25//2<-l>~b*10)or-1))

# Optimized solution
a,b=list(map(int,input().split()));l=max(a*25+1>>1,b*10);print((l*(~a*25//2<-l>~b*10)or-1))
# Original solution
A, B = list(map(int, input().split()))
for i in range(20000):
    if int(i*0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
print((-1))


# Optimized solution
A,B=list(map(int,input().split()))
for i in range(2000):
  if A==i*8//100 and B==i*10//100:
    print(i)
    break
else:
    print((-1))
# Original solution
A, B = list(map(int, input().split()))

ans = -1
for i in range(10000):
    if i * 8 // 100 == A:
        if i * 10 // 100 == B:
            ans = i
            break

print(ans)

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

x = max((A*100+7)//8, B*100//10)
y = min((A+1)*100/8, (B+1)*100/10)

if x < y:
    ans = x
else:
    ans = -1

print(ans)
# Original solution
import math
a, b = list(map(int, input().split()))
for i in range(1001):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
        print(i)
        exit(0)
print((-1))


# Optimized solution
import math
a, b = list(map(int, input().split()))
for i in range(1001):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        exit(0)
print((-1))
# Original solution
a,b = list(map(int,input().split()))   
c = -1
for i in range(20000):
    if int(i*0.08) == a and int(i*0.1) == b :
        c = i
        break
print(c)  

# Optimized solution
a,b = list(map(int,input().split()))   
c = -1
for i in range(10000):
    if int(i*0.08) == a and int(i*0.1) == b :
        c = i
        break
print(c)
# Original solution
A,B = list(map(int,input().split()))

for i in range(100000):
    if int(i*0.08) == A and int(i*0.1) == B:
        break
print((i if i != 99999 else -1))


# Optimized solution
A,B = list(map(int,input().split()))
for i in range(10000):
    if int(i*0.08) == A and int(i*0.1) == B:
        print(i)
        exit()
print((-1))
# Original solution
import math
a,b = list(map(int,input().split()))

i = math.floor(a/0.08)
while i < 10001:
    if math.floor(i*0.08) == a and math.floor(i*0.1) ==b:
        print(i)
        break
    i += 1
else:
    print((-1))


# Optimized solution
a,b = list(map(int,input().split()))
for price in range(10000):
    if price * 8 // 100 == a and price * 10//100 ==b:
        print(price)
        exit()
else:
    print((-1))
# Original solution
A, B = list(map(int, input().split()))
for i in range(100000):
    if int(i*0.08)==A and int(i*0.1)==B:
        print(i)
        break
else:
    print((-1))

# Optimized solution
A, B = list(map(int, input().split()))
for i in range(10**4+100):
    if int(i*0.08)==A and int(i*0.1)==B:
        print(i)
        break
else:
    print((-1))