peterverebics/CodeNet_Python_118 huggingface dataset:
A,B = map(int, input().split())
price_A = (A * 100) // 8
price_B = B * 10

price_A_pl = (A * 100+8) // 8
price_B_pl = (B + 10) * 10
ans = -1
ans2 = -1

if price_A // 10 == B:
    ans = price_A
if (price_B*8) // 100 == A:
    ans = price_B
    
if price_A_pl // 10 == B:
    ans2 = price_A_pl
if (price_B_pl*8) // 100 == A:
    ans2 = price_B_pl

if ans2 != -1 and ans != -1:
    ans = min(ans, ans2)
elif ans2 != -1 and ans == -1:
    ans = ans2

print(ans)
a,b = map(int,input().split())
a1 = int((a) * 100/8)
a2 = int((a + 1) * 100/8)
b1 = int((b) * 10)
b2 = int((b + 1) * 10)
al = list(range(a1,a2))
bl = list(range(b1,b2))
if a2 > b1:
    print(max(min(al),min(bl)))
else:
    print(-1)
a, b = map(int, input().split())

pa = int(a * 100/8)
pb = int(b * 100/10)

for price in range(pb, pa+1):
    if int(price * 0.08) == a and int(price * 0.1) == b:
        print(price)
        exit()

print(-1)
from math import ceil,floor
def without_tax(a,b):
    w_a = ceil(a/0.08)
    m_w_a = floor((a+1)/0.08)
    w_b = ceil(b/0.1)
    m_w_b = floor((b+1)/0.1)
    if m_w_b < w_a or m_w_a < m_w_b:
        return -1
    return max(w_a,w_b)
a,b = [int(e) for e in input().split()]
print(without_tax(a,b))
A, B=map(int, input().split())

Alist=[i for i in range(int(A/0.08),int((A+1)/0.08))]
Blist=[i for i in range(int(B/0.1),int((B+1)/0.1))]

if set(Alist)&set(Blist):
  print(min(set(Alist)&set(Blist)))
else:
  print("-1")
S = [int(x) for x in input().split()]
A = S[0]
B = S[1]
ans = -1

for i in range(100):
    num = (i+1)
    MotoA = int(num * 0.08)
    MotoB = int(num * 0.1)
    if MotoA == A and MotoB ==B:
        ans = num
        break

print(ans)
A,B=map(int,input().split())
a=A/(0.08); 
res=0
# print(a,b)
for n in range(1250):
    if (n<=a<n+1):
        tmp=n*0.1
#         print(tmp)
        if (B<=tmp<B+1):
            res=n
#             print(res)
print(-1 if res==0 else res)
A, B = (int(x) for x in input().split())
h = []
for i in range(1, 1000):
    if int(i * 8 / 100) == A and int(i / 10) == B:
        h.append(i)
if h != []:
    print(h[0])
else:
    print(-1)
A, B = map(int, input().split())

calc_A = A / 0.08
calc_B = B / 0.1

if calc_A // 10 == calc_B // 10:
    print(max(int(calc_A), int(calc_B)))
else:
    print(-1)
import math

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

c = math.ceil(a/0.08)
d = math.floor(c+12.5)
e = int(b/0.1)
f = int(e+10)
x = -1

for i in range(c, d+1):
    for j in range(e, f+1):
        if i==j:
            x = i
            break
    else:
        continue
    break

print(x)
#O(1)
from math import ceil
a,b = map(int, input().split( ))
if int(min(a/0.08,b/0.1))<ceil(max(a/0.08,b/0.1)):
    print(-1)
    exit()
print(ceil(max(a/0.08,b/0.1)))
import math
a , b = map(int,input().split())
al = math.ceil(a / 0.08)
ar = math.floor((a + 1)/0.08)
bl = math.ceil(b/0.1)
br = math.floor((b+1)/0.08)
ans = 0
if al <= bl and ar >= bl:
    ans = bl
elif al >= bl and br >= al:
    ans = al
else:
    ans = -1
# if al == bl:
#     ans = al
# elif al > bl:
#     if al > br:
#         ans = -1
#     else:
#         ans = al
# elif al < bl:
#     if ar < bl:
#         ans = -1
#     else:
#         ans = bl
print(ans)
from collections import defaultdict 
a,b=map(int,input().split())


dic=defaultdict(lambda:-1)
for i in range(100,0,-1):
    dic[int(i*0.08),int(i*0.10)]=i
    
print(dic[a,b])
import math
a,b=map(int,input().split())
n = math.ceil(a/0.08)
m = math.floor(b/0.1)

for i in range (min(n,m),max(n,m)+1):
  if math.floor(i * 0.08) == math.floor(i*0.1):
    print(i)
    break
    
if n==m:
  print(n)
elif math.floor(max(n,m)*0.08) != math.floor(max(n,m)*0.1):
  print(-1)
a,b = map(int, input().split())
c = int(a*(5/4))
d = a*(11/8)
if c<=b and b<d:
  print(max(int(12.5*a),int(10*b)))
else:
  print(-1)
num = {}

num = input().split()

# print(num)

answer = int(int(num[0]) / 0.08)

kensyo = int(answer * 0.1) == int(num[0])

# print(kensyo)

if kensyo:
  print(int(int(num[0]) / 0.08))
else:
  print(-1)
#ABC158
a,b = map(int,input().split())

tax_a = a/0.08
tax_b = b/0.1
c = max(tax_a,tax_b)
if int(c*0.08) == a and int(c*0.1) == b:
    print(int(c))
else:
    print('-1')
a,b=map(int, input().split())
n=0
for i in range(a * 100 // 8 + 1):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    n+=1
    break
if n == 0:
  print(-1)
import sys
import math
input = sys.stdin.readline

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

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

print("-1")
A, B = map(int, input().split())
target = -1
for i in range(1300):
  if int(i*0.08) == A and int(i*0.1) == B:
    target = i
print(target)
import math
a,b=map(int,input().split())

for i in range (1100):
  if a <= i*0.08 <=a+1:
    if b<= i*0.1 <=b+1:
      print(i)
      exit()
# For taking space seperated integer variable inputs.
import math


def invr():
    return(map(int, input().split()))


A, B = invr()

x = int(A / 0.08)
y = int(x * 0.1)

if y == B:
    print(x)
else:
    print(-1)
import math

nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]

c = 10*(10 * a - b)

r = math.floor(c/7)

if math.floor(r*0.08) != a or math.floor(r*0.1) != b:
    print(-1)
else:
    print(r)
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    for i in range(1,1010):
        if (0.08*i)==A and (0.1*i)==B:
            print(i)
            return
    print('-1')

if __name__ == '__main__':
    main()
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a < 0 or result_b < 0:
  print(-1)
elif result_a > result_b:
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)
import math
A,B = map(int,input().split())

ans = []
for i in range(1,101):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        ans.append(i)

if not ans:
    print('-1')
else:
    print(min(ans))
a,b=map(int,input().split())
tax8=a/2*25
tax8l=(a-1)/2*25
tax8h=(a+1)/2*25
tax10=float(b*10)
tax10l=float((b-1)*10)
tax10h=float((b+1)*10)
if tax10>tax8l and tax10<tax8h and tax8>tax10l and tax8<tax10h:
    if max(tax8,tax10)>max(int(tax8),int(tax10)):
        print(max(int(tax8+1),int(tax10+1)))
    else:
        print(max(int(tax8),int(tax10)))
else:
    print(-1)
import math
A, B = map(int,input().split())
minA = math.floor(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.floor(B/0.08)
maxB = math.ceil((B+1)/0.08) -1
if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(min(minA,minB))
A, B = map(int, input().split())


def floor_inv(x, f):
    res = int(x / f)
    if int(res * f) < x:
        res += 1
    return res


lb1 = floor_inv(A, 0.08)
ub1 = floor_inv(A + 1, 0.08)

lb2 = floor_inv(B, 0.10)
ub2 = floor_inv(B + 1, 0.10)

if ub1 < lb2 or ub2 < lb1:
    print(-1)
else:
    print(max(lb1, lb2))
A,B = map(int,input().split())
for i in range(1,1251):
    if i*0.08==A and i *0.1==B:
        print(i)
        exit()
print('-1')
import math
a,b = map(int,input().split())
x = (round(a/0.08)) 
y = (round(b/0.1))
check = round(x*0.1)
if (check == b) :
    print(x)
else :
    print(-1)
a,b = map(int, input().split())

al=-int(-a/0.08)
ah = int((a+1)/0.08)
bl=-int(-b/0.1)
bh = int((b+1)/0.1)
if bl > al:
    cl = al
    ch = ah
    dl = bl
    dh = bh
else:
    cl = bl
    ch = bh
    dl = al
    dh = ah


#print(cl, ch, dl, dh)
if ch < dl:
    print(-1)
else:
    print(dl)
x, y = map(int, input().split())
a = x / 0.08
b = y / 0.1
ans = -1
for i in range(round(b), round((y+1)/0.08)):
    if round(a) ==i:
        ans = i
        break
print(ans)
a,b = map(int, input().split())

p = []
for i in range(10, 1000):
  if int(i*0.08) == a:
    if int(i*0.1) == b:
      p.append(i)

if len(p) == 0 or p[0] == 0:
  print(-1)
else:
  print(p[0])
A,B = map(int, input().split())
price_A = (A * 100) // 8
price_B = B * 10
ans1 = -1
ans2 = -1
ans = -1

if price_A // 10 == B:
    ans1 = price_A
if (price_B*8) // 100 == A:
    ans2 = price_B
    
if ans1 != -1 and ans2 != -1:
    ans = min(ans1, ans2)
elif ans1 == -1 and ans2 != -1:
    ans = ans2
elif ans1 != -1 and ans2 == -1:
    ans = ans1
print(ans)
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if tax_price_b == int(price_8 * 0.1):
    print(price_8)
elif tax_price_a == int(price_10 * 0.8):
    print(price_10)
else:
    print('-1')
a,b = map(int,input().split())

ans = int(a*12.5)
if ans // 10 == b:
    print(ans)
else:
    print(-1)
A,B = map(int,input().split())
x = int((100*A)/8)
y = int((100*B)/10)

if (int(x*0.08) == A)&(int(y*0.1) == B):
    print(x)
elif (int(y*0.08) == A)&(int(y*0.1) == B):
    print(y)
else:
    print("-1")
import math
a, b = map(int, input().split())
a_zei = 0
b_zei = 0
i =0

while i * 0.08 <= a:
    if i * 0.08 == a and math.floor(i * 0.1) == b:
        print(i)
        exit()

    i += 1


print(-1)
import math

A, B = map(int, input().split())
al = math.floor(12.5*A)
ar = math.floor(12.5*(A+1))

bl = 10*B
br = 10*(B+1)

if ar < bl or br < al:
  print("-1")
elif al < bl:
  print(bl)
else:
  print(al)
x, y = list(map(int,input().split()))
X = x//0.08
Y = y//0.1
if X == Y:
  print(X)
else:
  print(-1)
import math
a, b = map(int, input().split())

# 切り上げ
amin = math.ceil(a / 0.08)
bmin = math.ceil(b / 0.1)
# 切り捨て
amax = math.floor((a+1) / 0.08)
bmax = math.floor((b+1) / 0.1)
#print("{},{}".format(amin, bmin))
#print("{},{}".format(amax, bmax))

ret = -1
for i in range(amin, amax+1, 1):
    if bmin <= i and i <= bmax:
        ret = i
        break

print("{}".format(ret))
a,b=map(int,input().split())
ans=-1
for i in range(1,101):
    _A = (i * 8)//100
    _B = (i * 10)//100
    if a == _A:
        if b == _B:
            ans = i
            break

print(ans)
# coding: utf-8

A, B = map(int, input().split())
# print("A:", A, "B:", B)

n = int(A / 0.08)
m = int(B / 0.1)
n1 = int((A + 1) / 0.08)
m1 = int((B + 1) // 0.1)
m2 = {i for i in range(n, n1)}
m3 = {j for j in range(m, m1)}

s = set(m2 & m3)
if s:
    print(min(s))
else:
    print(-1)
a,b = map(int,input().split())
TF = True
A,B = [],[]
for i in range(10):
    ansA = int((a+0.1*i)*12.5)
    ansB = int((b+0.1*i)*10)
    A.append(ansA)
    B.append(ansB)
    if ansA in B:
        print(ansA)
        TF = False
        break
    elif ansB in A:
        print(ansB)
        TF = False
        break
if TF == True:
    print(-1)
A, B = map(int, input().split())

for p in range(10, 1010):
  if (8*p//100 == A) and (p//10 == B):
    print(p)
    break

print(-1)
import sys
a,b = map(lambda x: int(x),input().split())

for i in range(100) :
    a_tax = int((a + i*0.01)* (12.5))
    if a_tax < 13 and a_tax > 1262:
        continue
    for j in range(100) :
        b_tax = int((b + j*0.01)* (10))
        if b_tax < 10 and b_tax > 1010:
            continue
        if a_tax == b_tax :
            print(int(a_tax))
            sys.exit()
print(-1)
A,B=map(int,input().split())
for i in range(101):
    if ((i*8)+0.000005)//100==A and ((i*10)+0.000005)//100==B:
        print(i)
        exit()
    else:
        pass
print(-1)
a,b = list(map(int,input().split()))
to = 0

while 1:
  to += 100
  c = int(to * 0.08)
  d = int(to * 0.1)
  if c >= a and d >= b:
    
    while 1:
      to -= 1
      c = int(to * 0.08)
      d = int(to * 0.1)
      if c == a and d == b:
        print(to)
        exit()
      elif to % 100 == 0:
        print(-1)
        exit()
a, b = list(map(int, input().split()))

xa = int(a / 0.08)
xb = int(b * 10)
xaFlag =int(xa * 0.1) == b
xbFlag = int(xb * 0.08) == a
if(xaFlag == True and xbFlag == False):
    print(int(xa))
elif(xaFlag == False and xbFlag == True):
    print(int(xb))
elif(xaFlag == False and xbFlag == False):
    print(-1)
else:
    print(min(xa, xb))
a, b = map(int, input().split())

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)



print(a_arr)
print(b_arr)

for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')
import math
taxA, taxB= map(int,input().split())

minPriceA = math.floor(taxA / 0.08)
maxPriceA = math.ceil((taxA + 1) / 0.08) 

minPriceB = math.floor(taxB / 0.1)
maxPriceB = math.ceil((taxB + 1) / 0.1) 

 
minPrice = None
finish = False
for a in range(minPriceA, maxPriceA + 1):
	for b in range(minPriceB, maxPriceB + 1):
		if (a == b):
			minPrice = a
			finish = True
			break
	if (finish):
		break
if minPrice == None:
	print(-1)
else:
	print(minPrice)
x = [int(x) for x in input().split()]
A, B = x[0], x[1]
a = int(100 * A / 8)
b = 10 * B
if a == b:
    print(a)
elif a > b and int(a * 0.1) == B:
    print(a)
elif b > a and int(b * 0.08) == A:
    print(b)
else:
    print(-1)
import math

A, B = map(lambda x: int(x), input().split(" "))

result = -1
for i in range(1, 101):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        result = i
        break

print(result)
a,b = map(int,input().split())
for i in range(1300):
  if int(i*0.08) == a and int(i*0.1) == b:
    print(i)
    break
a,b = (int(x) for x in input().split())


my_index = []
for i in range(101):
    if int((i*0.08)) ==a and int((i*0.1))==b:
        my_index.append(i)
    if int((i*0.08)) ==b and int((i*0.1))==a:
        my_index.append(i)

if my_index != []:
    print(min(my_index))
else:
    print(-1)
A,B=map(int, input().split())

for i in range(1100):
    if int(i*0.8)==A and int(i*0.1)==B:
        print(i)
        break
else:
    print(-1)
A,B=map(float,input().split())
A_min=int(A/8*100)
A_max=int((A+1)/8*100)+1
ans=0
flag=False
if (A+1)*100%8==0:
    A_max=int((A+1)*100/8)
for i in range(A_min,A_max):
    if int(i*0.1)==B:
        ans=i
        flag=True
        break
if flag:
    print(ans)
else:
    print(-1)
a,b=map(int,input().split())
for i in range(1500):
  if int(i*0.08) == a and int(i*0.1) == b:
    print(i)

print(-1)
a, b = map(int, input().split())
tmp_a = int((a / 0.08) // 1)
tmp_b = int((b / 0.10) // 1)
check = True
for i in range(min(tmp_a,tmp_b), max(tmp_a, tmp_b) + 1):
    if int((i * 0.08)//1) == a and int((i * 0.10)//1) == b:
        print(i)
        check = False
        break
if check:
    print(-1)
a,b=map(int,input().split())

eightper = 0.08
tenper = 0.1
ans = -1
for i in range(100+1):
    if int(i*eightper)==a:
        if int(i*tenper)==b:
            ans=i
            break
print(ans)
# input
A,B = map(int, input().split())
# calculate
price = -1
for n in range(100):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    price = n
    break
  else:
    pass
# output
print(price)
a,b =map(int,input().split())
 
for x in range(101):
 if (x*1.08)//1==a+x and (x*1.10)//1==b+x and x//1==int(x):
  print(int(x))
  exit()
  
print(-1)
a,b = map(float,input().split())
c = a*12.5+0.001
d = b*10+0.001
if(int(c/10)==int(d/10)):
  ans = max(int(c),int(d))
else:
  ans = -1
print(ans)
import math

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

b = B * 10
ans = -1
for i in range(b, 1001):
    y = math.floor(i * 0.08)
    if y == A:
        ans = i
        break
print(ans)
A, B = [int(y) for y in input().split(' ')]
priceA_min = int((A/8) * 100)
priceA_max = int(((A+1)/8) * 100)
print(priceA_min, priceA_max)
found = False
for x in range(priceA_min,priceA_max+1,1):
  if int(x*0.1) == B:
    print(x)
    found = True
    break
if not found:
  print(-1)
a, b = map(int, input().split())
x = a / 0.08
print(int(x) if int(x*0.10)==b else -1)
a,b = map(int,input().split())
c = int(a / 0.08)
status = 0
ans = 0

for i in range(1,c+1):
    if 1 <= int(i * 0.08) and 1 <= int(i * 0.1) and int(i * 0.08) == a and int(i * 0.1) == b:
#        print(i)
        if int(i * 0.08) == a and int(i * 0.1) == b:
            status = 1
            ans = i
            break
        else:
            pass

if status == 1:
    print(ans)
else:
    print(-1)
a,b=map(int,input().split())
ans=-1
for k in range(1000):
    if int(k*0.08)==a and int(k*0.1)==b:
        ans=k
        break
    else:
        continue
print(ans)
A,B = map(int,input().split())

m08=A/0.08
m10low=B/0.1
m10up=(B+1)/0.1

if m08<m10up and m08>m10low:
  print(int(m08))
else:
  print(-1)
#C - Tax Increase
import math
A,B = map(int,input().split())

x = int(math.floor(A*(100/8)))
y = int((B*(100/10)))

ans = '-1'
for i in range(1,max(x,y)+1):
    if math.floor(i * 0.08)== A and math.floor(i*0.1) == B:
        ans = i
print(ans)
a, b = map(int, input().split())
for i in range(990):
    c = int((i + 10) * 0.08)
    d = int((i + 10) * 0.10)
    if c == a and d == b:
        print(i + 10)
        exit()
print('-1')
A, B = map(int, input().split())

ans = -1
for i in range(10 ** 3 + 1):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    ans = i
    
print(ans)
a,b=map(int,input().split())
z,x,c,v=10*b,10*b+10-1,50*a//4,50*(a+1)//4-1
if not len(range(max(z,c),min(x,v)+1)):print(-1)
else:print(max(z,c))
tax_eight, tax_ten = map(int, input().split())
min_eight_price = tax_eight / 0.08
max_eight_price = (tax_eight + 1) / 0.08
min_ten_price = tax_ten / 0.1
max_ten_price = (tax_ten + 1) / 0.1
min_price = max(min_eight_price, min_ten_price)
max_price = min(max_eight_price, max_ten_price)
if max_price < min_price:
    print(-1)
else:
    print(int(min_price))
n=list(map(int,input().split()))
import math
A=int(math.ceil(n[0]/0.08))
B=int(n[1]/0.1)
C=int((n[1]+1)/0.1)
D=int(math.ceil((n[0]+1)/0.08))
if A<<C and B<<D:
    if A==B:
        print(A)
    elif A>>B:
        print(A)
    elif A<<B:
        print(B)
else:
    print(-1)
import math
A, B = map(int, input().split())

Xa_max = (A + 1) / 0.08
Xa_min = (A) / 0.08

Xb_max = (B + 1) / 0.1
Xb_min = (B) / 0.1

# 範囲が被らない場合
if Xa_min >= Xb_max or Xb_min >= Xa_max:
    print(-1)
    exit()

if Xa_min >= Xb_min:
    ans = math.floor(Xa_min)
    if ans >= Xb_max:
        print(-1)
        exit()
else:
    ans = math.floor(Xb_min)
    if ans >= Xa_max:
        print(-1)
        exit()

print(ans)
#!/usr/bin/env python3
import sys
import math
#input = sys.stdin.buffer.readline

def inn(func=int):
    return list(map(func,input().split()))

def ins():
    return input().split()

a,b = inn()
p8 = int(a/2)*25+int(a%2)*13
p10 = b*10
p8_ = p8+12 if a%2 == 0 else p8+12+11
p10_ = p10+9

#print(p8,p10,p8_,p10_)
if p8 == p10:
    print(p8)
elif p8 > p10 and p8 <= p10_:
    print(p8)
elif p10 > p8 and p10 <= p8_:
    print(p10)
else:
    print(-1)
import math
 
A, B = map(int, input().split())
min_ans = -(-A // 0.08)
 
kouho = [min_ans]
to_continue = True
while to_continue:
    min_ans += 1
    if math.floor(min_ans * 0.08) == A:
        kouho.append(min_ans)
    else:
        break
        
print_flag = False
for i in kouho:
    if math.floor(i * 0.1) == B:
        print_flag = True
        print(i)
        break
    
if print_flag == False:
    print('No')
import sys

A, B = [int(x) for x in input().split()]
for x in range((A+1)*10,(B+1)*10):
  if A == x*8//100 and B == x//10:
    print(x)
    sys.exit()
print(-1)
A, B = map(int, input().split())
flag = 0
for i in range(10000):
    x = (i * 8) // 100
    y = (i*10)//100
    if(x == A & y == B):
        print(i)
        flag = 1
        break
if(flag == 0):
    print('-1')
A,B=map(int,input().split())
c=0
for i in range(1,100000):
  if (i*0.08)//1==A and (i**0.1)//1==B:
    c=i
    break
if c!=0:
  print(c)
else:
  print(-1)
a, b = map(int, input().split(' '))

for i in range(101):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit(0)
print(-1)
a, b = map(int, input().split())
a1 = set([int((a + i/100) * 12.5) for i in range(1000)])
b1 = set([int((b + i/1000) * 10) for i in range(1000)])
res = a1 & b1
if res:
    print(min(res))
else:
    print(-1)
A,B = [int(i) for i in input().split()]
emax = (A + 1) / 0.08
emin = A / 0.08
tmax = (B + 1) / 0.1
tmin = B / 0.1

if emin < tmax and emin >= tmin:
    print(int(emin))
elif tmin < emax and tmin >= emin:
    print(int(tmin))
else:
    print(-1)
import math
A, B = list(map(int, input().split()))

amax = math.floor((A + 1) / 8 * 100)
amin = math.ceil(A / 8 * 100)
bmax = math.floor((B + 1) / 10 * 100)
bmin = math.ceil(B / 10 * 100)

if amin >= bmin:
    answer = amin if amin < bmax else - 1
else:
    answer = bmin if bmin < amax else -1

print(answer)
a, b = map(int, input().split())

no_tax_1 = a * 100 // 8
no_tax_2 = a * 100 // 7

while no_tax_1 <= no_tax_2:
    if round(no_tax_1 * 0.1) == b:
        print(no_tax_1)
        exit()
    no_tax_1 += 1
print(-1)
a,b=map(int,input().split())
ah,bh=a+.99,b+.99
a1,a2=a/.08,ah/.08
b1,b2=b/.1,bh/.1
if a2<b1 or b2<a1: print(-1)
else:
    if b1<=a1<=b2: print(round(a1))
    elif a1<=b1<=a2: print(round(b1))
    elif b1<=a2<=b2: print(round(a2))
    elif a1<=b2<=a2: print(round(b2))
a,b=map(int,input().split())
ans=-1
for x in range(1,1000):
    if int(x*0.08)==a and int(x*0.10)==b:
        ans=x
        break
print(ans)
import sys
import math

str = input() # input()で入力を受け取り、それを変数strに代入
#print(str)
#print(str.split(' '))

ary = str.split(' ')
A = int(ary[0])
B = int(ary[1])

#print(A)
#print(B)

X1 = math.floor(A / 0.08)
X2 = math.floor(B / 0.1)

X11 = math.floor(X1 / 10)
X22 = math.floor(X2 / 10)
AX = math.floor(X1 * 0.1)


#print(X1)
#print(X2)
#print(AX)
#print(X11)
#print(X22)

#print(X1 if X1 < X2 else X2)

if X1 >= X2 and X11 == AX:
  print(X1)
else:
  print('-1')
a, b = list(map(int, input().strip().split()))
for i in range(0,1000):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    break
else:
  print("-1")
import math
a,b = map(int,input().split())
p1 = a / 0.08
p2 = b / 0.1
ans = math.inf

if math.floor(p1 * 0.1) == b:
    ans = p1
if math.floor(p2 * 0.08) == a:
    ans = min(ans,p2)
if ans == math.inf:
    ans = -1
print(int(ans))
#coding:utf-8

def main():
    a, b = map(int, input().split())
    
    for i in range(2000):
        if int(i * 0.08) == a and round(i * 0.1) == b:
            print(i)
            break
    else:
        print(-1)

if __name__ == '__main__':
    main()
a,b = map(int, input().split())
print(int(10*a+2*b))
import math
a,b=map(int,input().split())
ax=set(range(math.ceil(25*a/2),math.floor(25*(a+1)/2)+1))
bx=set(range(math.ceil(10*b),math.floor(10*(b+1))+1))
x=list(ax&bx)
if x:
  print(x[0])
else:
  print(-1)
a, b = map(int, input().split())
for i in range(1,1009):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(int(i))
print("-1")
A,B = map(int, raw_input().split())

result = False
Amin = int(round(A * 12.5)) 
Amax = int(round((A+1) * 12.5)-1)
Bmin = B * 10
Bmax = (B+1) * 10


for i in range(Amin,Amax+1):
    for j in range(Bmin,Bmax+1):
        
        if(i == j):
            print(i)
            result = True
            break

    if(result):

        break



if(result==False):
    print(-1)
a, b = list(map(int, input().split()))

tmp = int((a*12.5) // 1)
cnt = tmp

while (cnt*0.08)//1 == a:
  cnt += 1
if cnt == tmp:
  cnt += 1
#print(tmp, cnt)
for i in range(tmp, cnt):
  ans = int((i * 0.1)//1)
  #print(i ,ans)
  if ans == b:
    print(i)
    exit()
print(-1)
a, b = map(int, input().split())
for i in range(int(a/0.08), int((a+1)/0.08)):
    if int(i * 0.1) == b:
        print(i)
        break
else: print(-1)
import math
A, B = map(int,input().split())

Amin = A/0.08 
Amax = (A+1)/0.08
Bmin = B/0.1 
Bmax = (B+1)/0.1

ans = 0
if Amax <= Bmin or Amin >= Bmax:
    ans = -1
else:
    if Bmin <= Amin:
        ans = math.floor(Amin)
    if Amin <= Bmin:
        ans =math.floor(Bmin)

print(ans)
import math
import numpy as np
a,b = map(int,input().split())

amin,amax,bmin,bmax = 0,0,0,0

amin = a/0.08
amax = math.floor((a + 0.999999999999999999999999999999)/0.08)
bmin = b/0.1
bmax = math.floor((b + 0.99999999999999999999999999999999)/0.1)

alist = np.arange(amin,amax,1)
blist = np.arange(bmin,bmax,1)
matched_list = []
src_set = set(alist)
tag_set = set(blist)
anslist = list(src_set & tag_set)

if len(anslist)==0:
    print('-1')
else:
    print(int(min(anslist)))
a,b = list(map(int,input().split()))

A = list(range(int((a / 0.08)),int((a+1)/0.08)-1))
B = list(range(int((b / 0.1)),int((b+1)/0.1)-1))
price = set(A) & set(B)
if len(price) == 0:
    ans = -1
else:
    ans = min(price)
print(ans)