peterverebics/CodeNet_Python_118 huggingface dataset:
import math
A,B=map(int, input().split())

X1=math.ceil(A/0.08)
X2=math.floor((A+1)/0.08)

if (A+1)*100%8==0:
  X2=X2-1

Y1=math.ceil(B/0.1)
Y2=math.floor((B+1)/0.1)-1



if (Y1>X2)or(X1>Y2):
  print(-1)
elif X1>=Y1:
  print(X1)
else:
  print(Y1)
import math
a, b = map(int, input().split())

ans = -1
for i in range(1, 1250):
    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())
for i in range(1,1001):
    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())
for x in range(0,2000):
    if math.floor(x*0.08)==a and math.floor(x*0.10)==b:
        print(x)
        break
else:
    print(-1)
import math
a,b=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)
from math import ceil

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

max_A = (A+1)*12.5
min_A = (A)*12.5
max_B = (B+1)*10.0
min_B = B*10.0

if min_A < max_B and min_A >= min_B:
    print(ceil(min_A))
elif min_B < max_A and min_B >= min_A:
    print(ceil(min_B))
else:
    print(-1)
def C158():
    A, B = [int(_) for _ in input().split()]
    N = 1
    while N <= 10000:
        if int(N * 8/100) == A and int(N * 10/100) == B:
            break
        N += 1
    if N <= 10000:
        print(N)
    else:
        print(-1)
        
if __name__ == "__main__":
    C158()
from math import ceil
a,b = map(int,input().split())

ah=(a+1)//0.08
al=ceil(a/0.08)
bh=(b+1)//0.1
bl=ceil(b/0.1)

if ah < al or bh < bl:
    ans = -1
else:
    if (al <= bh and ah >= bl) or (al >= bh and ah <= bl):
        ans = max(al,bl)
    else:
        ans = -1
        
print(ans)
import math
A,B = map(int,input().split())
ans = 0
for i in range(1001):
  pay = i * 0.08
  pby = i * 0.1
  if math.floor(pay) == A and math.floor(pby) == B:
    ans = i
    break
  else:
    ans = -1
print(ans)
import math
A,B = map(int,input().split())
a = A / 0.08
b = B / 0.1
#print(a,b)
if a > b:
    if int(a * 0.1) == B:
        print(math.ceil(a))
    else:
        print(-1)
elif b > a:
    if int(b * 0.08) == A:
        print(math.ceil(b))
    else:
        print(-1)
else:
    print(math.ceil(a))
import math

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

X = 13

while math.floor(X * 0.08) != A or math.floor(X * 0.10) != B:
    X += 1
    if math.floor(X * 0.08) > A:
        X = -1
        break

print(X)
a, b = map(int, input().split())
for x in range(b * 10, (b + 1) * 10):
  if int(x * 0.08) == a:
    print(x)
    break
else:
  print(-1)
#a,b小さいのでこれで可
a,b = map(int, input().split( ))

mn = int(a/(0.1))-5
mx = int(b/0.08)+3

for i in range(mn,mx):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()

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

ans = -1
for i in range(10**5):
    if i*8//100 == A and i*10//100 == B:
        ans = i
        break
    elif i*8//100 > A and i*10//100 > B:
        break
print(ans)
def readinput():
    a,b=map(int,input().split())
    return a,b

def main(a,b):
    for i in range(20000):
        if i*108//100 - i ==a and i*110//100 - i ==b:
            return i
    return -1

if __name__=='__main__':
    a,b=readinput()
    ans=main(a,b)
    print(ans)
A,B = (int(x) for x in input().split())
for n in range(0,1009):
  za = n*8//100
  zb = n*10//100
  if za == A and zb == B:
    print(n)
    exit()
print(-1)
A, B = map(int, input().split())

def check(x):
    a = int(x * 0.08)
    b = int(x * 0.10)
    if (a == A) and (b == B):
        return True
    else:
        return False

for i in range(1, 10000):
    if check(i):
        print (i)
        exit()
print (-1)
tax8 = 0.08
tax10 = 0.1

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

t8  = int(a / tax8)
t10 = int(b / tax10)

tmp8 = 0
for i in range(t8,0,-1):
  if(not (int(i * tax8) == a)):
    tmp8 = i + 1
    break

l = []
for i in range(tmp8,tmp8+20):
  if(int(i * tax8) == a):
    l += [i]
  else:
    break

ll = []
for i in l[::-1]:
  if(int(i * tax10) == b):
    ll += [i]

if(not (ll == [])):
  print(min(ll))
else:
  print(-1)
# -*- coding: utf-8 -*-
i_str = input()
A,B = map(int,i_str.split())
import sys
import math
#price = 10
#X = math.floor(price * 0.08)
#Y = math.floor(price*0.1)

if A > B:
    print(-1)

for i in range(B*100):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        sys.exit()
print(-1)
a, b =map(int,input().split())

x = 9
while True:
  if a == int(x * 0.08) and b == int(x*0.1):
    print(x)
    break
  elif a < int(x * 0.08) and b < int(x*0.1):
    print(-1)
    break
  x += 1
import math

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

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

for i in range(1,1100):
    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())
import math
if 10*(b+1) <= 12.5*a or 12.5*(a+1) <= 10*b:
  print(-1)
else:
  print(max(math.ceil(12.5*a), 10*b))
a,b=list(map(float,input().split()))
import sys
for i in range(100000):
  if int(i*8/100)==a and int(i*10/100)==b:
    print(i)
    sys.exit()
print(-1)
A,B=map(int,input().split())
ans=-1
for i in range(10000):
     x=int(i*0.08)
     y=int(i*0.1)
     if A==x and B==y:
        ans=i
        break
print(ans)
def input_int_list():
    return [int(thing) for thing in input().split(" ")]
def No():
    print(-1)
    exit()
def eight(x):
    return int(x*0.08//1)
def ten(x):
    return int(x*0.1//1)

A,B=input_int_list()

for i in range(1,1009):
    if eight(i)==A and ten(i)==B:
        print(i)
        exit()
No()
x, y = list(map(int,(input().split())))

for a in range(1,10001):
    if int(a * 0.1) == y:
        if int(a * 0.08) == x:
            print(a)
            exit()
print(-1)
p=input().split(" ")
a=int(p[0])
b=int(p[1])
c=a*10-1
d=int(a/0.07)-1
num=[]
ans=[]
for i in range(c,d+1):
    if int(i*0.08)==a:
        num.append(i)
l=len(num)

for i in range(l):
    if int(num[i]*0.1)==b:
        ans.append(num[i])
if ans==[]:
    print("-1")
else:
    print(ans[0])
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    a,b=map(int,readline().split())

    for n in range(b*10,b*10+10):
        if n*8//100==a:
            print(n)
            break
    else:
        print(-1)

if __name__=="__main__":
    main()
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) == B:
        print(i)
        exit()

print("-1")
mi = lambda : map(int,input().split())

a,b = mi()

for i in range(1,1002):
    if((int(i*0.08) == a) & (int((i*0.1)) == b)):
        print(i)
        break
else:
    print('-1')
import math

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

for i in range(1001):
    if math.floor(i*0.08) == A and math.floor(i*0.10) == B:
        print(i)
        break
else:
    print(-1)
n,m=map(int,input().split())
for i in range(1,1263):
  if int(i*0.08)==n and int(i*0.1)==m:
    print(i)
    break
else:
  print(-1)
a, b = map(int, input().split())
flag = 0
for i in range(10*b, 10*(b + 1)):
    if int(i * 0.08) == a:
        flag = 1
        break
if flag:
    print(i)
else:
    print('-1')
tax8, tax10 = map(int,input().split())
import math

tax10_list = []
list = []
count = 0

for i in range(10):
    tax10_list.append(math.floor(tax10*10+i))

for x in range(10):
    if math.floor(tax10_list[x] * 0.08) == tax8:
        print(tax10_list[x])

        break
    else:
        count += 1

if count == 10:
    print("-1")
else:
    None
import math
count = 0
a, b = map(int, input().split())
k = 10 * b
while 10 * b <= k < 10*b + 10:
  if math.floor(0.08 * k) == a:
    print(k)
    count += 1
    break
  else:
    k += 1

if count == 0:
  print(-1)
import math

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

ans = []
for i in range(1010): 
    ans8 = math.floor(i * 0.08)
    ans10 = math.floor(i * 0.1)
    if ans8 == A and ans10 == B:
        ans.append(i)
 
if len(ans) != 0:
    print(min(ans))
else:
    print(-1)
A, B = (int(i) for i in input().split())  
A_list = []
for i in range(8001):
    tmp = int(i*0.08)
    if tmp==A:
        A_list.append(i)
B_list = []
for i in range(10001):
    tmp = int(i*0.1)
    if tmp==B:
        B_list.append(i)
and_list =  set(A_list)&set(B_list)
try:
    print(min(and_list))
except:
    print(-1)
a,b = map(int,input().split())
al = []
bl = []
import math
ans = -1
for i in range(1,1251):
    if math.floor(i*0.08) == a:
        if math.floor(i*0.1) == b:
            ans = i
            break
print(ans)
a,b=map(int,input().split());print(([i for i in range(10**6)if(i//12.5==a)*i//10==b]+[-1])[0])
import math

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

ans = -1
for i in range(1, 10001):
    c = math.floor(i * 0.08)
    d = math.floor(i * 0.10)

    if a == c and b == d:
        ans = i
        break

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

for i in range(1, 1001):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit()
print(-1)
import sys
A, B = map(int, input().split())
 
for i in range(10 ** 5):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    print(i)
    sys.exit()
  else:
    continue
else:
  print(-1)
i=list(map(int, input().split()))
a=i[0]
b=i[1]
k=1001
for j in range (1000,0,-1):
    if int(j*0.08)==a and int(j*0.1)==b:
        k=j
if k==1001:
    print(-1)
else:
    print(k)
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
else:
    print('-1')
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

    res = -1

    for i in range(1,1251):
        price8 = int(i*0.08)
        price10 = int(i*0.1)
        if (price8 == A) & (price10 == B):
            res = i
            break

    print(res)



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

def solve(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return x == a and y == b

ans = -1
for n in range(20000):
    if solve(n):
        ans = n
        break
print(ans)
# input
A,B = map(int, input().split())
# calculate
price = -1
for n in range(10000):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    price = n
    break
  else:
    pass
# output
print(price)
import math
A, B = map(int, input().split())

lsta = list(range(math.ceil(12.5*A), math.ceil((A+1)*12.5)))

ans = -1

for i in lsta:
    if int(i*0.1)==B:
        ans=i
        break
print(ans)
import sys
input = sys.stdin.readline

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

start = int(((a * 100)/8) + 0.5)
if a % 2 == 0:
    candidate1 = list(range(start, start + 13))
else:
    candidate1 = list(range(start, start + 12))
start = (b * 10)
candidate2 = list(range(start, start + 10))

ans = -1
for i in candidate2:
    if i in candidate1:
        ans = i
        break
print(ans)
import math
b, c = map(int, input().split())
b_before_min = math.ceil(b / 0.08)
b_before_max = (b+1) / 0.08
c_before_min = math.ceil(c / 0.1)
c_before_max = (c+1) / 0.1

# maxは取り得ない値.0
if(c_before_min <= b_before_min and b_before_min < c_before_max):
    print(int(b_before_min))
elif(b_before_min <= c_before_min and c_before_min < b_before_max):
    print(int(c_before_min))
else:
    print(-1)
a, b = input().split(" ")
a, b = int(a), int(b)
ans = -1
for i in range(1, 1010):
    if (int(i * 0.08) == a) and (int(i * 0.10) == b):
        ans = i
        break

print(ans)
import math

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

cnt = 0
for i in range(1,100000):
    X = math.floor(i * 0.08)
    Y = math.floor(i * 0.1)
    if A == X and B == Y:
        print(i)
        cnt += 1
        break
        
if cnt == 0:
    print(-1)
def main():
    A, B = map(int, input().split())

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

    print(-1)


if __name__ == "__main__":
    main()
a,b = map(int,input().split())
for i in range(1,100000):
    if i*8//100==a and i*10//100==b:
        print(i)
        break
else:
    print(-1)
A, B = map(int, input().split())
ans = -1

for i in range(1251):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    ans = i
    break

print(ans)
a, b = map(int, input().split())
flag = False
for i in range(1300):
  if i * 8 // 100 == a and i * 10 // 100 == b:
    flag = True
    break
if flag:
  print(i)
else:
  print(-1)
a, b =  map(int, input().split())
ans = 2000
for i in range(2000):
    if i * 8 // 100 == a and i // 10 == b:
        ans = min(ans, i)
if ans == 2000:
    print(-1)
else:
    print(ans)
n,m= map(int,input().split())
num = 0

f_n = False
f_m = False

num_n = 0
num_m = 0

while True:
  num_n = int(num * 0.08)
  num_m = int(num * 0.1)
  if int(num_n) == n:
    f_n = True
  if int(num_m) == m:
    f_m = True
  if f_m == True and f_n == True:
    print(num)
    break
  if num_m > 100 or num_n > 100 :
    print(-1)
    break
  f_m = False
  f_n = False
  num += 1
A,B = list(map(int,input().split()))

for i in range(min(int(A / 0.08),int(B / 0.10) ),max(int((A+1)/0.08),int((B+1)/0.08))):
  # print(i)
  if int(i*0.08) == A and int(i*0.10) == B:
    print(i)
    break
else:
  print(-1)
import sys

A, B = map(int, sys.stdin.readline().split())

for i in range(20000):
    a = int(i * 0.08)
    b = int(i * 0.10)
    if a == A and b == B:
        print(i)
        sys.exit()

print(-1)
a,b = map(int, input().split())
cnt=0
ans=0
for x in range(1,1010):
    if 8*x//100==a and x//10==b:
        cnt += 1
        ans=x
        break
if cnt>0: print(ans)
else: print(-1)
a,b = map(int,input().split())
import math

for i in range(1,1101):
    a1 = int( math.floor( i * 0.08 ) )
    if a1 == a:
        b1 = int( math.floor( i * 0.10 ) )
        if b1 == b:
            print(i)
            exit()
print(-1)
a,b = map(int,input().split())
s = 1 / 0.08
t = 1 / 0.1
ans = -1
for i in range(1009):
    if i//s==a and i//t==b:
        ans = i
        break
print(ans)
N=[i for i in range(1,1001)]
A,B=map(int,input().split())
for j in range(len(N)):
  m=int(N[j]*0.08)
  if m>A:
    break
  elif m==A:
    M=int(N[j]*0.1)
    if M==B:
      print(N[j])
      exit()
    elif M>B:
      break
print(-1)
from math import floor
a,b=map(int,input().split())
A=[]
B=[]
for i in range(1,10001):
    x=int(floor(i*0.08))
    y=int(floor(i*0.1))
    if x==a:
        A.append(i)
    if y==b:
        B.append(i)
A=set(A)
B=set(B)
ans=list(A&B)
if ans:
    print(min(ans))
else:
    print(-1)
import sys
input = sys.stdin.readline
import math

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

for i in range(10 ** 6):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        sys.exit()
print(-1)
a,b=map(int,input().split());l=max(0--a*25//2,b*10);print([-1,l][l<min(-~a*25//2,-~b*10)])
a, b = [int(x) for x in input().split()]
 
if (b < a):
    temp = b
    b = a
    a = temp
 
 
x = 1
while True:
    if (int(x*0.08) == a and int(x*0.1) == b):
        print(x)
        break
    else:
        if (x > 1500):
            print(-1)
            break
        else:
            x += 1
import math
import sys
x,y= map(int,input().split())
for i in range(1001):
    if math.floor(i *0.08) == x and math.floor(i *0.10) == y:
        print(i)
        sys.exit()
print(-1)
import math

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

mina, maxa = math.ceil(a / 0.08), math.ceil((a+1) / 0.08)-1
minb, maxb = b * 10, (b+1) * 10 -1

if minb <= maxa and minb >= mina:
    print(minb)
elif mina <= maxb and mina >= minb:
    print(mina)
else:
    print(-1)
A, B = [int(i) for i in input().split()]
candidate = [i for i in range(10*B, 10*(B+1))]
result_list = [i for i in candidate if (25/2) * A <= i and i < (25/2) * (A+1)]
if result_list == []:
  print(-1)
else:
  print(min(result_list))
from math import ceil,floor

A,B=map(int,input().split())
x_min=int(min(ceil(A/0.08)-5, ceil(B/0.1)-5))
x_max=int(max(ceil((A+1)/0.08)+5, ceil((B+1)/0.1)+5))
exists=0
for i in range(x_min, x_max):
  if floor(i*0.08)==A and floor(i*0.1)==B:
    print(i)
    exists=1
    break
if not exists:print(-1)
A, B = [int(i) for i in input().split(" ")]

for i in range(B * 100):
    tmp1 = int(i * 0.08)
    tmp2 = int(i * 0.1)

    if tmp1 == A and tmp2 == B:
        print(i)
        break
else:
    print(-1)
import sys
import math

a, b = [int(s) for s in sys.stdin.readline().strip().split()]

ans = -1
for i in range(1, 2000):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ans = i
        break
print(ans)
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    A, B = iim()
    ans = 10 * B
    for i in range(ans, ans+10):
        if (8*i) // 100 == A:
            print(i)
            return
    print(-1)


if __name__ == "__main__":
    resolve()
a, b = map(int,input().split())
for i in range(1005):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        break
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 int(i*decimal.Decimal("0.08")) > a:
        print("-1")
        break
A,B=map(int,input().split())

for i in range(1,10101):
  if int(i*0.08)==A and int(i*0.1)==B:
    print(i)
    exit(0)
else:
  print(-1)
from math import floor
a, b = map(int, input().split())

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

print(-1)
a, b = map(int, input().split())
tmp_a = int((a / 0.08) // 1)
tmp_b = int((b / 0.10) // 1)
check = True
# print(tmp_a, tmp_b)
for i in range(min(tmp_a,tmp_b), max(tmp_a + 1, tmp_b + 1) + 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())

isok = False
for i in range(1,2000):
    n1 = i * 0.08
    n2 = i * 0.1
    n1 = n1//1
    n2 = n2//1
    
    if(n1==A and n2==B):
        print(i)
        isok=True
        break

if(not isok):
    print(-1)
a, b = 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')
a, b = map(int, input().split())
a_max = ( a + 1) // 0.08
b_max = ( b + 1) // 0.1
max = int(a_max) if a_max > b_max else int(b_max)
flg = 0
for i in range(1, max):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        flg = 1
        print(i)
        break

if flg == 0:
    print(-1)
i = [int(s) for s in input().split()]
a = i[0]
b = i[1]

min = (a*10) -1
max = (b*12.5) +1
c1=0
c2=0

while min < max:
  c1 = int(min * 0.08)
  c2 = int(min * 0.1)
  if c1 == a and c2 == b:
    print(min)
    break
  else:
    min += 1
else:
  print(-1)
import math
a,b=map(int,input().split())
b*=10
ans=0

for i in range(9):
    j=b
    j+=i 
    if int(j*0.08)==a:
        ans=j
        break
if ans!=0:
    print(ans)
else :
    print(-1)
a,b=map(int,input().split())
for i in range(0,1001):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()

print(-1)
import math
import sys

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

for c in range(1, 100 * 20 + 1):
    if math.floor(c * 0.08) == A and math.floor(c * 0.1) == B:
        print(c)
        sys.exit()
else:
    print(-1)
from math import floor
a,b=map(int,input().split())
for i in range(1010):
  if floor(i*0.08)==a and floor(i*0.1)==b:
    print(i)
    exit()
print(-1)
import math
a, b = map(int,input().split())
ans = []

for x in range(1,1009):
    if math.floor(x * 0.08 )== a and math.floor(x * 0.1) == b:
        ans.append(x)

if len(ans) == 0:
    print("-1")
else:
    print(min(ans))
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

if bmin == amax or amin == bmax:
    print(-1)
else:
    ans = max(amin, bmin)
    ans = math.ceil(ans)
    if ans < amax and ans < bmax:
        print(ans)
    else:
        print(-1)
import math
A, B = map(int, input().split())
Al = math.ceil(A / 0.08)
Au = int((A + 0.99) // 0.08) + 1
Bl = math.ceil(B / 0.1)
Bu = int((B + 0.9) // 0.1) + 1
Ar = [x for x in range(Al, Au)]
Br = [y for y in range(Bl, Bu)]
X = set(Ar) & set(Br)
print(-1 if list(X) == [] else min(X))
from math import floor
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(1, 10000):
    if floor(i*0.08) == A and floor(i*0.1) == B:
        print(i)
        exit()
print(-1)
A, B = map(int, input().split())

min_ans = int((12.5*A) // 1)
max_ans = int(-((-12.5*(A+1)) // 1))

ans = -1
for i in range(min_ans,max_ans):
  temp_A = (i*0.08)//1
  temp_B = (i*0.1)//1
  if temp_A == A and temp_B == B :
    ans = i
    break
  
print(ans)
a, b = map(int,input().split())
i = 0
ans = -1
while True:
    if int(i*0.080) == a and int(i*0.10) == b:
        ans = i
        break
    elif int(i*0.080) > a or int(i*0.10) > b:
        break
    i += 1
print(ans)
import math
a, b = map(int, input().split())

for i in range(1, 1250):
  if int(i*0.08) == a and int(i*0.1) ==b:
    print(i)
    quit()
print(-1)
A, B = map(int, input().split(" "))
_min = int(A / 0.10)
_max = int(B / 0.08)
flg = True
for i in range(_min-3, _max+3):
  if int(i *  0.08) == A and int(i * 0.10) == B:
    print(i)
    flg = False
    break
if flg:
  print(-1)
from math import floor

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

res = -1
for price in range(1, 10**6):
    if floor(price*0.08) == A and floor(price*0.1) == B:
        res = price
        break

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

for i in range(1, 12500):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit(0)
print(-1)
A, B = map(int,input().split())
 
sum_A = int(A/0.08)
sum_B = int(B/0.10)

flag = True
for i in range(1010):
    if A == int(i * 0.08) and B == int(i * 0.10):
        print(i)
        flag = False
        break
    else:
        #print(-1)
        continue
if flag:
    print(-1)
import math
A,B = map(int,input().split())
Xa = A * 12.5
Xb = B * 10
X = math.ceil(max(Xa,Xb))
ansA = math.floor(X * 0.08)
ansB = math.floor(X * 0.1)
# print(ansA,ansB)
if A == ansA and B == ansB:
    print(X)
else:
    print(-1)
import math
A, B = map(int, input().split())
 
max_val = int(math.ceil(A / 0.07))
min_val = int(math.floor(B / 0.11))
 
for i in range(min_val, max_val + 1):
    if int(i * 0.08) > A or int(i * 0.1) > B:
        break
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit(0)
print(-1)
a,b = map(int, input().split())

for i in range(1251):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()
else:
    print(-1)
a, b = map(int, input().split())

x = a // 0.08
y = b // 0.10
x, y = int(x), int(y)
minv = min(x, y)
maxv = max(x, y)
ans = []

for i in range(minv, maxv+2):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        ans.append(i)

if len(ans) == 0:
    print(-1)
else:
    print(min(ans))
A, B =list(map(int, input().split()))
i=0
for N in range(1,1001):
    N_a=int(N*0.08)
    N_b=int(N*0.1)
    
    if A==N_a and B==N_b:
        print(N)
        i+=1
        break
if i==0:
    print(-1)
A, B = map(int, input().split())

i = min(int(A/0.08), int(B/0.1)) * 1.0
while(True):
  if int(i * 0.08) == A and int(i*0.1) == B:
    print(int(i))
    break
  i = 1.0 + i
  if int(i * 0.08) > A or int(i*0.1) > B:
    print('-1')
    break
a,b=map(int,input().split())
for i in range(3000):
    if int(i*0.08)==a and int(i*0.10)==b:
        print(i)
        exit()
print("-1")
A, B =  [float(i) for i in input().split(' ')]

B1 = int(B /0.1)
B2 = int((B+1) / 0.1)
flag = 0
for i in range(B1, B2):
    if int(i * 0.08) == A :
        print(i)
        flag = 1
        break
if flag == 0:
    print(-1)
A, B = map(int, input().split())
flag = 1
for i in range(1,10001):
  if int(i*0.08) == A and int(i*0.1) == B:
    print(i)
    flag = 0
    break
if flag:
  print(-1)