peterverebics/CodeNet_Python_118 huggingface dataset:
A,B = map(int,input().split())
min_8=int(A*(100/8))
max_8=int((A+1)*(100/8))
min_10=int(B*10)
max_10=int((B+1)*10)
if max_8 < min_10:
    print("-1")
elif min_8 > max_10:
    print("-1")
elif max_8 >= min_10:
    if min_8 < min_10:
        print(min_10)
    elif min_8 >= min_10:
        print(min_8)
A, B = map(int, input().split())

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

if x == y:
    print(x)
elif int(x * (10/100)) == A:
    print(x)
elif int(y * (8/100)) == A:
    print(y)
else:
    print(-1)
import math
a,b=map(int,input().split())
for i in range(1,101):
  if(math.floor(i*0.08)==a and math.floor(i*0.1)==b):
    print(i)
    exit()
print(-1)
def main():
    a, b = map(int, input().split())
    eight = [i for i in range(0, 101) if a == int(i * 0.08)]
    ten = [i for i in range(0, 101) if b == int(i * 0.1)]
    for i in eight:
        for j in ten:
            if i == j:
                print(i)
                return
    print(-1)


if __name__ == '__main__':
    main()
import math

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

#Process
Ans = -1
tmp08_min = math.ceil(A / 0.08)
tmp08_max = tmp08_min + 13
tmp10_min = math.ceil(B / 0.10)
tmp10_max = tmp10_min + 10

tmp_min = min(tmp08_min, tmp10_min)
tmp_max = max(tmp08_max, tmp10_max)

cnt = 0
while cnt < tmp_max - tmp_min:
    if(A == int((tmp_min + cnt) * 0.08) and B == int((tmp_min + cnt) * 0.10)):
        Ans = tmp10_min + cnt
        break
    cnt += 1

#Output
print(Ans)
from math import ceil
from math import floor
a,b = map(int,input().split())
l1 = ceil((a-0.50001)/0.08)
r1 = floor((a+0.5)/0.08)
l2 = ceil((b-0.50001)/0.1)
r2 = floor((b+0.5)/0.1)
l3 = max(l1,l2)
r3 = min(r2,r1)
if(l3<=r3):
    print(l3)
else:
    print(-1)
from math import floor

a, b = [int(i) for i in input().split()]
for i in range(0, 1011):
    print(i, floor(i * 0.08), floor(i * 0.1))
    if floor(i * 0.08) == a and floor(i * 0.1) == b:
        print(i)
        break
else:
    print(-1)
a, b = map(int, input().split())

price_8 = -int(-a/0.08)
price_10 = -int(-b/0.1)

print(price_10) if price_10==price_8 else print(-1)
A,B = map(int,input().split())
x = int((100*A)/8)
y = int((100*B)/10)
while (int((x-1)*0.08) == A)&(int((x-1)*0.1) == B):
    x -= 1
while (int((y-1)*0.08) == A)&(int((y-1)*0.1) == B):
    y -= 1

if(int(x*0.08) == A)&(int(x*0.1) == B):
    print(x)
elif(int(y*0.08) == A)&(int(y*0.1) == B):
    print(y)
else:
    print("-1")
A, B = map(int, input().split())

N = 1000
p1 = 0.08
p2 = 0.1

for i in range(1, N + 1):
    if int(i * p1) == A and int(i * p2):
        print(i)
        exit()

print("-1")
A,B = map(int,input().split())

AA = A*100//8
BB = B*10
AAA = [i for i in range(AA,(A+1)*100//8+1)]
BBB = [i for i in range(BB,(B+1)*10+1)]
AB_list = list(set(AAA)&set(BBB))

ans = min(AB_list) if AB_list and (12<min(AB_list)<=1000) else -1
print(ans)
def main():
    a, b = map(int, input().split(" "))
    a1 = a*100/8
    a2 = (a+1)*100/8
    b1 = b*10
    b2 = (b+1)*10
    if a2<b1:
        print(-1)
    else:
        print(int(max(a1,b1)))
        
    

if __name__ == "__main__":
    main()
import math
def main():
  A, B = map(int, input().split())
  
  #Nは最大でも１２５０
  
  for n in range(1, 2000):
    if math.floor(n * 0.08) == A and math.floor(n * 0.1) == B:
      print(n)
      return
  print(-1)
  
  print(math.floor(25 * 0.08))
  print(math.floor(25 * 0.1))
    
  
main()
a,b = map(float,input().split())

max8 = (a+1) * (1/0.08)
min8 = a * (1/0.08)
max10 = (b+1) * (1/0.1)
min10 = b * (1/0.1)
hachi = [int(min8),int(min8)+1]
jyuu = [i for i in range(int(min10),int(max10))]
if a > b:
    print('-1')
else:
    if hachi[0] in jyuu:
        print(hachi[0])
    elif hachi[1] in jyuu:
        print(hachi[1])
    else:
        print('-1')
A,B = map(int,input().split())

PA = int(-(-A // 0.08))

if int(PA*0.1) == B:
    print(PA)

else:
    print(-1)
a,b = map(int,input().split())
fulla = int(a*12.5)
ans = -1
while fulla//12.5 == a:
  if fulla//10==b:
    ans = fulla
    break
  fulla += 1
print(ans)
from math import ceil
def without_tax(a,b):
    w_a = ceil(a/0.08)
    m_w_a = ceil((a+1)/0.08)
    w_b = ceil(b/0.1)
    m_w_b = ceil((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())
M=int(-1)
for i in range(1000):
    if int(i*0.08)==A:
        if int(i*0.10)==B:
            M=i
            break

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

for x in range(0,10001):
    print('---')
    print(x)
    ax = (8*x)//100
    bx = (10*x)//100
    print(ax,bx)
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)
E,T=map(int,input().split())

Emotone=(E/0.08)
A=int(E/0.08)

if Emotone>A:
  Emotone=int(A+1)

if T<=((0.1/0.08)*E)<T+1:
  print(int(Emotone))
else:
  print(-1)
A,B = map(int,input().split())

a=-(-A//0.08)
b=-(-B//0.1)
c=-(-(A-1)//0.08)
d=-(-(A+1)//0.08)

if a==b or c < b < d:
    print(a)
else:
    print(-1)
# coding: utf-8
# Your code here!

x, y = list(map(int,(input().split())))


for a in range(1,101):
    if int(a * 0.1) == y:
        if int(a * 0.08) == x:
            print(a)
            exit()
print(-1)
a,b=input().split()
a=int(a)
b=int(b)
x=10
y=int(x*8/100)
z=int(x*10/100)
for i in range(10000):
  if y==a and z==b:
    print(x)
  else:
    x=x+1
import math

tax_8, tax_10 = map(int, input().split())

price_8_min = tax_8 / 0.08
price_8_max = (tax_8 + 0.99) / 0.08

price_10_min = tax_10 / 0.1
price_10_max = (tax_10 + 0.99) / 0.1

if price_8_min <= price_10_max or price_10_min <= price_8_max:
    print(math.ceil(max(price_8_min, price_10_min)))
else:
    print('-1')
#57
import decimal
a,b = map(int,input().split())

for i in range(1,10001):
    num1 = int(i*decimal.Decimal("0.08"))
    num2 = int(i*decimal.Decimal("0.1"))
    if num1 == a and num2 == b:
        print(i)
        break
    if i*decimal.Decimal("0.08") > a:
        print("-1")
        break
import math
a, b = map(int,input().split())

prca = math.ceil(a / 0.08)
prcb = math.ceil(b / 0.1)
base = max(prca, prcb)

while True:
    if int(base * 0.08) < a or int(base * 0.1) < b:
        ans = base - 1
        break
    base -= 1

if int(ans * 0.08) != a or int(ans * 0.1) != b:
    ans = -1
    
print(ans)
a,b = map(float,input().split())
a_base_min = int(a * 25 /2)
a_base_max = int((a+1)*25/2)
b_base_min = int(b *10)
b_base_max = int((b+1) *10)

if (b_base_min <= a_base_min) and (a_base_min <= b_base_max):
    print(int(a_base_min))
elif (a_base_min < b_base_min) and (b_base_min <= a_base_max):
    print(int(b_base_min))
else:
    print(-1)
#O(1)
from math import ceil
a,b = map(int, input().split( ))
if int(min(a/0.08,b/.01))<ceil(max(a/0.08,b/0.1)):
    print(-1)
    exit()
print(ceil(max(a/0.08,b/0.1)))
a, b = [int(i) for i in input().split()]
A = int(a/0.08)
B = int(b/0.1)
if A == B:
  print(A)
else:
  print(-1)
a,b=(int(x) for x in input().split())
#print(a)
#print(b)

am=int(100/8*a)
al=int(100/8*(a+1))
if ((a+1)%4)==0:
       al=al-1

bm=int(10*b)
bl=int(10*(b+1))-1

#print (am,al)
#print (bm,bl)
for ia in range(am,al):
       for ib in range(bm,bl):
       		if ia==ib:
       			print (ia)
       			exit()
else:
  print(-1)
from math import floor, ceil

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

minx1 = A/0.08
maxx1 = (A+1)/0.08
minx2 = B/0.1
maxx2 = (B+1)/0.1

rangeMin = max(minx1, minx2)
rangeMax = min(maxx1, maxx2)
if rangeMax < rangeMin:
    print(-1)
else:
    print(floor(rangeMin+1))
A,B = [int(i) for i in input().split()]
for i in range(101):
    if int(i*0.08)==A and int(i*0.1)==B:
        print(i);exit()
print(-1)
a, b = map(int, input().split())

new_a = a / 0.08
new_b = b / 0.10

if new_a > new_b:
  tax = a
  while tax == a:
    new_a -= 1
    tax = new_a * 0.08
    print(int(new_a + 1))
elif new_a <= new_b:
  tax = b
  while tax == b:
    new_b -= 1
    tax = new_b * 0.10
    print(int(new_b + 1))
else:
  print("-1")
import math

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

point = a/0.08
seg_a = (math.ceil(point), math.floor(point + 12.5))

point = b/0.1
seg_b = (point, point + 9)

if seg_b[1] < seg_a[0]:
    print(-1)
else:
    print(int(seg_a[0]))
a, b = map(int, input().split())

for n in range(10000):
    xa = n * 0.08
    xb = n * 0.1
    if a == xa and b == xb:
        print(n)
        exit()
print(-1)
from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    A,B = map(int, readline().split())

    x1 = ceil(A / 0.08)
    x2 = ceil(B / 0.1)
    print(x1, x2)

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()
import math
A, B = list(map(int, input().split()))

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

if amin > bmax or bmin > amax:
    print(-1)
else:
    print(int(max(amin, bmin)))
import math
A,B = map(int, input().split())
answerA = math.ceil(A/0.08)
answerAA = math.floor((A+1)/0.08)
answerB = math.ceil(B/0.1)
answerBB = math.floor((B+1)/0.1)
if answerA < answerB and answerAA >= answerB:
    print(answerB)
elif answerB < answerA and answerBB >= answerA:
    print(answerA)
elif answerA >= answerB and answerAA <= answerBB:
    print(answerA)
elif answerB >= answerA and answerBB <= answerAA:
    print(answerB)
else:
    print("-1")
a,b = map(int,input().split())

o = 0.08
t = 0.1

x = a / o
y = b / t

if x > y:
	lst = [i for i in range(int(y),int(x+1))]
else:
	lst = [i for i in range(int(x),int(y+1))]

for i in lst:
	if int(i * o) == a and int(i*t)==b:
		print(i)
		exit()

print(-1)
import math


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

estimated = b * 10

ans = -1
for i in range(10):
    if (estimated+i) == math.ceil(a/0.08) and a == int((estimated+i)*0.08) and b == int((estimated+i)*0.1):
        ans = estimated+i
        break
print(ans)
A,B = map(int,input().split())

AA = A*100//8
BB = B*10
AAA = [i for i in range(AA,(A+1)*100//8)]
BBB = [i for i in range(BB,(B+1)*10)]
AB_list = list(set(AAA)&set(BBB))

ans = min(AB_list) if AB_list and (12<min(AB_list)<=1000) else -1
print(ans)
import math
A, B = map(int, input().split())
a1 = math.ceil(A*12.5)
a2 = math.floor((A+1)*12.5)
b1 = B*10
b2 = b1 + 10

if a2 < b1 or b2 < a1:
    print(-1)

elif a1 < b1:
    print(b1)

else:
    print(a1)
import math
import itertools
import statistics
#import numpy as np
import collections
a, b = list(map(int, input().split()))
#print(a/0.08)
price = a/0.08
if b==price*0.1//1:
    ans = int(price//1)
    print(ans)
else:
    while math.ceil(price*0.08)==a:
        price += 1
        if b==price*0.1//1:
            ans = int(price//1)
            print(ans)
            exit()

    print("-1")


# print(a/0.08*0.1//1)
#print(b/0.1)
a,b=map(int,input().split())
print(int(a/0.08))
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)
print(price_8, price_10)

if tax_price_b == int(price_8 * 0.1):
    print(price_8)
else:
    print('-1')
a, b = map(int,input().split())
e = 10**-4
mi = max(int((a+e)/0.08),int((b+e)/0.1))
ma = min(int((a+1+e)/0.08),int((b+e+1)/0.1))
if mi > ma:
    print(-1)
else:
    print(mi)
A,B = (int(x) for x in input().split())
for i in range(1,101):
    Ahan = int(i * 0.08)
    Bhan = int(i * 0.10)
    if (Ahan == A and Bhan == B):
        print(i)
        break
    
    if(i == 100):
        print(-1)
        break
a,b = map(int,input().split())

list = []
if 100*a%8:
  x=int(a/0.08)+1
else:
  x=int(a/0.08)

for i in range(x, int((a+1)/0.08)+1):
    if b/0.1 <= i <(b+1)/0.1:
        list.append(i)
        list = sorted(list)
        print(list[0])
        exit()

print('-1')
from math import *
A,B = map(int,input().split())

#A = x*.08
#x1 = A / 0.08
#x2 = B / 0.1

x = 0
while 1:
    x += 1
    if floor(x*0.08) == A:
        break

if B == floor(x * 0.1):
    print(int(x))
else:
    print(-1)
ret = -1

A, B = [int(i) for i in input().split()]

if A<0 or B<0:
    print("-1")
    exit()

minA = int(A/0.08)
maxA = int((A+1)/0.08)
minB = int(B/0.1)
maxB = int((B+1)/0.1)

print(minA, maxA, minB, maxB)

for i in range(minA, maxA):
    if i >= minB and i < maxB:
        ret = i
        break

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

for x in range(0,101):
  if (0.1*x)//1 == B and (0.08*x)//1 == A:
    print(x)
    exit(0)
print(-1)
import math

a, b = [ int(v) for v in input().split() ]
ans = -1
for i in range(1, 101):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans = i
        break
print(ans)
A, B = map(int, input().split())

a_min = A * 12.5
a_max = a_min + 12.5

b_min = B * 10.0
b_max = b_min + 10.0

if b_min <= a_min < b_max:
    print(int(a_min))
elif a_min <= b_min < a_max:
    print(int(b_min))
else:
    print(-1)
a,b=map(int,input().split())
am=a*(100/8)
aM=(a+1)*(100/8)
bm=b*(100/10)
bM=(b+1)*(100/10)
x=[]
for i in range(101):
    if am<=i<aM and bm<=i<bM:
        x.append(i)
    else:
        pass
if len(x)==0:
    print('-1')
else:
    print(x[0])
a,b = map(int,input().split())
ans = 0
for i in range(1001,-1,-1):
  money0 = int(i*0.08)
  money1= int(i*0.1)
  if money0==a and money1==b:
    ans = i
print(ans)
A, B = map(int, input().split())
for p in range(0, 101):
    if int(p*0.08) == A and int(p*0.1) == B:
        print(p)
        break
    if p == 100:
        print(-1)
import math
a,b = [int(i) for i in input().split()]
if math.floor(10*a/8) == b: print(100*a//8)
else: print(-1)
import math
A,B = map(int,input().split())

small=math.ceil(A/0.08)
big = math.ceil(B/0.1)

#print (small)
#print (big)

flag = False
if small ==big:
  flag =True
  print (small)
else :
  for i in range(big,small+1,1):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    #print (a)
    #print (b)
    if a==b:
      print (i)
      flag = True
      break
      break
if flag==False:
  print (-1)
a,b=map(int,input().split())

if 25*a/2<=10*b < (25/2)*(a+1):
  ans=10*b
if 10*b<=25*a/2<10*(b+1):
  if a%2==1:
    ans=25*a//2+1
  if a%2==0:
    ans=25*a//2
else:
  ans="-1"
print(ans)
import sys
A, B = map(int, input().split())

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

print(-1)
A, B = map(int, input().split())

for x in range(200):
    a = x * 8 // 100
    b = x * 10 // 100

    if a == A and b == B:
        print(x)
        quit()

print(-1)
a,b=map(int,input().split())
ans=-1
for i in range(b*10+1,b*50):
	if int(i*0.08)==a and int(i*0.1)==b:
		ans=i
		break
print(ans)
A,B = map(int,input().split())
ak = []
bk = []
for k in range(-int((-A/0.08)//1),-int(-(A/0.08+12.5)//1)):
  ak.append(k)
for k in range(-int((-B/0.10)//1),-int(-(B/0.10+10.0)//1)):
  bk.append(k)
print(ak)
print(bk)
ans = min(set(ak) & set(bk)) if len(set(ak) & set(bk)) > 0 else -1
print(ans)
import math
a, b = map(int, input().split())
a1 = math.ceil(a/0.08)
a2 = math.ceil(b/0.1)
a3 = math.ceil((a+1)/0.08)
a4 = math.ceil((b+1)/0.1)

if(max(a1, a2) > min(a3, a4)):print(-1)
else:print(max(a1, a2))
import sys
A,B=map(int,input().split())
c=A*25//2
d=B*10
for i in range(d,d+11):
  if int(i*0.08)==A:
    print(i)
    sys.exit()
print(-1)
A,B = map(int,input().split())
import math
b = B/0.1

b_list = []
for i in range(10):
  b_list.append(b+i)

for i in b_list:
  pre_cnt = i*0.08
  cnt = math.floor(pre_cnt)
  if cnt == A:
    print(i)
    exit()

print(-1)
import math as m
a,b=map(int,input().split())
flag=True
for i in range(1,10**6):
    if m.floor(i*(0.08))==a and m.floor(i*(0.08))==b:
        flag=False
        print(i)
        break
if flag:
    print(-1)
import math
A, B = list(map(int, input().split(' ')))
a = 0.08
b = 0.10

x_min = math.ceil((A-1) / a)
x_max = math.ceil((A+1) / a)
y_min = math.ceil((B-1) / b)
y_max = math.ceil((B+1) / b)

X = set(range(x_min, x_max))
Y = set(range(y_min, y_max))

r = X & Y
R = min(r) if len(r) > 0 else -1
if len(r) == 1 and R == 0:
  R = -1
  
print(R)
a, b = map(int, input().split(' '))

ans = (b-a)*50
if ans == 0:
    ans = 25
    print(ans)
    exit()
if ans*0.08 == a:
    if ans*0.1 == b:
        print(ans)
        exit()

print('-1')
import math


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

estimated = b * 10

ans = -1
for i in range(10):
    if (estimated+i) == math.ceil(a/0.08):
        ans = estimated+i
        break
print(ans)
def calc(percent,tax):
  return (tax*100)//percent


def main():
  print(calc(8,A) if calc(10,B)<=calc(8,A)<calc(10,B+1) else -1)

if __name__=='__main__':
  A, B = map(int, input().split())
  main()
a,b=map(int, input().split())
n=0
for i in range(a * 100 // 8 + 2):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    n+=1
    break
if n == 0:
  print(-1)
# coding: utf-8

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

a_target1 = a / 0.08
a_target2 = (a + 1) / 0.08

b_target1 = b / 0.1
b_target2 = (b + 1) / 0.1


result_list = []

for i in range(int(a_target1), int(a_target2) - 1):
    if i >= b_target1 and i < b_target2:
        result_list.append(i)

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

for i in range (10100):
  if int(i*0.08) == A and int(i*0.1) == B:
    print(i)
    break
import math
A,B = map(int, input().split())
tax_a = 8/100
tax_b = 10/100
al = A/tax_a
ar=  (A+1)/tax_a
bl = B/tax_b
br=  (B+1)/tax_b
if br < al or ar < bl:
    print(-1)
elif bl<al and ar<bl:
    print(math.floor(al))
elif al<bl and br < ar:
    print(math.floor(bl))
elif bl < al < br < ar:
    print(math.floor(al))
elif al < bl < ar < br:
    print(math.floor(bl))
elif al == bl:
    print(math.floor(al))
else:
    print(-1)
import math

a,b=map(int,input().split())
x=int(a/0.08)
y=int(a/0.1)
#print(x,y)
for i in range(y,x+1):
  #print(math.ceil(i*0.08),math.ceil(i*0.1))
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    break
else:
  print(-1)
from math import ceil
from math import floor
A, B = map(int, input().split())
a1 = ceil(A/0.08)
b1 = ceil(B/0.10)
a2 = floor((A+1)/0.08)
b2 = floor((B+1)/0.10)
if b2 < a1 or a2 < b1:
  print(-1)
else:
  print(max(a1, b1))
A,B=map(int,input().split())
sA=int(A/0.08)
if int(sA*0.1)==B:
    print(sA)
else:
    print(-1)
import math
A,B = map(int,input().split())

small=math.floor(A/0.08)
big = math.floor(B/0.1)

#print (small)
#print (big)

flag = False
if small ==big:
  flag =True
  print (small)
else :
  for i in range(big,small+1,1):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    #print (a)
    #print (b)
    if a==b:
      print (a)
      flag = True
      break
      break
if flag==False:
  print (-1)
from math import ceil, floor

A, B = map(int, input().split())
for i in range(100):
    j = i+1
    if floor(j*0.08) ==A and floor(j*0.1)==B:
        print(j)
        break
else:
    print(-1)
a,b=map(int,input().split())
x=0
for i in range(b*9+1,b*10+1):
  if (i*0.08)//1<=i*0.08 and i*0.08<(i*0.08)//1+1:
    print(i)
    x=i
    break
if x==0:
  print('-1')
A,B=map(int,input().split())

if int(A/(0.08))==int(B/(0.1)):
    print(max(int(A/0.08),int(B/0.1)))
else:
    print(-1)
A,B = map(int, input().split())
ans = []

taxfree = A/0.08
while taxfree*0.08 < A+1:
    if B <= taxfree*0.1 < B+1:
        ans.append(int(taxfree))
        break
    taxfree += 1

taxfree = B/0.1
while taxfree*0.1 < B+1:
    if B <= taxfree*0.08 < A+1:
        ans.append(int(taxfree))
        break
    taxfree += 1

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

ans = 0

for i in range(1, 1000):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        ans = i
        break
print(ans if ans > 0 else -1)
a, b = [int(elem) for elem in input().split()]

res = a / 0.08
if int(res * 0.1) == b:
  print(int(res))
else:
  print(-1)
import math
from collections import deque
def main():
    a,b = tuple([int(t)for t in input().split()])

    for i in range(1,100):
        a_tax = i * 108//100
        b_tax = i * 110/100

        if a == a_tax and b == b_tax:
            print(i)
            return

    print(-1)

if __name__ == "__main__":
    main()
a, b = map(int, input().split())

x = max((a//0.08)+1, int(a/0.08))
y = b//0.1*0.1

if int(x*0.08) == int(x*0.1):
    print(x)
elif int(y*0.08) == int(y*0.1):
    print(y)
else:
    print(-1)
l1=input().split(" ")
t80=int(l1[0])
t100=int(l1[1])
t80_min=(t80/0.08)
t80_max=((t80+1)/0.08)
t100_min=(t100/0.1)
t100_max=((t100+1)/0.1)
if t80_max<t100_min:
    print("-1")
else:
    if t80_min<=t100_min:
        print(t100_min)
    else:
        print(t80_min)
import math

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

c = math.ceil(a/0.08)
d = math.floor(a/0.08+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)
def main():
    A,B = map(int,input().split())
    for i in range(1,101):
        if(2*i//25 == A and i//10 == B):
            print(i)
            return 0
    print(-1)

main()
a8, a10 = input().split(' ')
a8 = int(a8)
a10 = int(a10)
 
value1 = int(a8 / 0.08)
value2 = int(a10 / 0.1)
if int(value1 * 0.1) == a10:
  if value1 > value2:
    print(value1)
  else:
    print(value2)
elif int(value2 * 0.08) == a8:
  if value1 > value2:
    print(value1)
  else:
    print(value2)
else:
  print(-1)
import math
A,B = map(int,input().split())
a = A / 0.08
b = B / 0.1
if math.floor(a * 0.1) == B:
    ans = int(a)
elif math.floor(b * 0.08) == A:
    ans = int(b)
else:
    print(-1)
    exit()
if math.floor((ans-1)*0.08) == A and math.floor((ans-1)*0.1) == B:
    ans = ans - 1
else:
    print(ans)
def main():
    A, B = map(int, input().split())

    for i in range(int(B/0.1), int(A/0.08)+1):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            print(i)
            return

    print(-1)
    
main()
import math

def main():

    a, b = [int(i) for i in input().split()]

    lo = max(1000 * a, 800 * b)
    hi = min(1000 * (a + 1), 800 + (b + 1))

    if lo < hi:
        print(math.ceil(lo / 80))
    else:
        print(-1)


main()
import math as mt
K = input().split(" ")
A = int(K[0])
B = int(K[1])
a = float(A*12.5)
t = float((A+1)*12.5)
t1 = mt.ceil(t)
b = B*10
a1 = mt.ceil(a)
A_data = []
B_data = []
for i in range(b,b+10):
    A_data.append(i)
for i in range(a1,a1+t1):
    B_data.append(i)
A_set = set(A_data)
B_set = set(B_data)
AB_set = A_set & B_set
if AB_set:
    P = min(AB_set)
    print(P)
else:
    print(-1)
a,b=(int(x) for x in input().split())
if int(25*(a+1)/2)<int(10*b):
  print(-1)
elif int(25*(a+1)/2)==int(10*b):
  if a%2==0:
    print(-1)
  else:
    print(int(25*a/2))
elif int(10*(b+1))<=int(25*a/2):
  print(-1)
elif int(10*(b+1)-1)==int(25*a/2):
  if a%2==1:
    print(-1)
  else:
    print(int(25*a/2))  
else:
  if a%2==1:
    print(max([int(25*a/2+1),int(10*b)]))
  else:
    print(max([int(25*a/2),int(10*b)]))
A, B = map(int, input().split())

Amin = A / 0.08
Amax = (A + 1) / 0.08

Bmin = B / 0.10
Bmax = (B + 1) / 0.10

Aset = set(list(range(round(Amin), round(Amax))))
Bset = set(list(range(round(Bmin), round(Bmax))))

result_set = Aset & Bset

if len(result_set) == 0:
    print(-1)
else:
    print(min(list(result_set)))
a, b = map(int, input().split())
for num in range(1, 102):
    if int(num * 0.08) == a and int(num * 0.10) == b:
        break
if num == 101:
    print(-1)
else:
    print(num)
a,b = map(int,input().split())
a_list = [int(a/0.08) + i for i in range(13)]
b_list = [int(b/0.1) + j for j in range(10)]
com = set(a_list) & set(b_list)
print(a_list)
print(b_list)
print(com)

if len(com) == 0:
    print(-1)
elif len(com) != 0:
    if int(min(com)*0.08) != a or int(min(com)*0.1) != b:
        print(-1)
    else:
        print(min(com))
import math
a, b = map(int, input().split())

a_min, a_max = round(12.5 * a), math.floor(12.5 * (a + 1))
b_min, b_max = round(10 * b), math.floor(10 * (b + 1))

if a_min <= b_min <= a_max:
    print(b_min)
elif b_min <= a_min <= b_max:
    print(a_min)
else:
    print(-1)
import math
A, B = map(int, input().split())

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