peterverebics/CodeNet_Python_118 huggingface dataset:
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.ceil(Xa_min)
    if ans >= Xb_max:
        print(-1)
        exit()
else:
    ans = math.ceil(Xb_min)
    if ans >= Xa_max:
        print(-1)
        exit()

print(ans)
[A, B] = list(map(int, input().split()))

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

if ans == 0 :
    ans = -1

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

for i in range(1251):
    if a <= 0.08 * i < a + 1 and b <= 0.1 * i < b + 1:
        print(i)
        break
    elif i == 1250:
        print(-1)
A,B = map(int,input().split())
import math
q = 0
for i in range(math.ceil(12.5*A),int(12.5*(A+1))):
    if 10*B <= i < 10*(B+1):
        q = i
        break
if q != 0:
    print(i)
else:
    print(-1)
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 math
a, b = 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)
import math
A, B = map(int, input().split())

eightlow = math.ceil(A/0.08)
eighthigh = int((A+1)//0.08)
tenlow = math.ceil(B/0.1)
tenhigh = int((B+1)//0.1)

eight = []
ten = []

for i in range(eightlow, eighthigh+1):
    eight.append(i)
for i in range(tenlow, tenhigh+1):
    ten.append(i)

for i in range(len(eight)):
    for j in range(len(ten)):
        if eight[i] ==ten[j]:
            print(eight[i])
            exit()

print(-1)
ans=0
a,b=map(int,input().split())
for i in range(10000):
    ans1=int(i*1.08)
    ans2=int(i*1.1)
    ans11=ans1-i
    ans22=ans2-i
    if ans11==a and ans22==b:
        print(i)
        exit(0)
print(-1)
A,B = map(int,input().split())

hoge = list(range(B*10,(B*10)+10))

ans = []
for i in hoge:
    if (i * 0.08) // 1 == A:
        ans.append(i)

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

a, b = map(int, input().split())
i = -1
atax = -1
btax = -1
while not ((atax == a and btax == b) or (btax > 100)):
    i += 1
    atax = math.floor(i * 0.08)
    btax = math.floor(i * 0.1)
if btax > 100:
    print(-1)
else:
    print(i)
from math import floor as fl
from math import ceil as ce
a,b=map(int,input().split())
aini=ce(a/0.08)
bini=ce(b/0.1)
out=max(aini,bini)
r=-1
while fl(out*0.08)>=a and fl(out*0.1)>=b:
  if fl(out*0.08)==a and fl(out*0.1)==b:
    r=out
  out-=1
print(r)
#X=int(input())
import math
import sys
A,B= map(int, input().split())
for i in range(1,1002):
    if A==math.floor(i*0.08) and B==math.floor(i*0.1):
        print(i)
        sys.exit()
print("-1")
a,b =map(int,input().split())
for i in range(1009):
  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(1,1001):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i) 
        sys.exit()
print(-1)
A,B=map(int, input().split())

ans=1100
for i in range(1,1002):
    if int(i*0.08) ==A and int(i*0.1) ==B:
        if i < ans:
            ans =i

print(ans if ans <1100 else -1)
a,b=map(int, input().split()) 

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

print(-1)
import math

a, b = map(int, input().split())
a_origin = math.ceil(a*100/8)
b_origin = b*10

while True:
    if a_origin == b_origin:
        result = a_origin
        break;
    if a_origin < b_origin:
        a_origin += 1
    else:
        b_origin += 1

    if a_origin >= (a+1) * 100/8 or b_origin >= (b+1) * 10:
        result = -1
        break

print(result)
A, B = map(int, input().split())
MAX = 10 ** 3 + 1
res = -1
for i in range(1, MAX):
    if int(0.08 * i) == A and int(0.1 * i) == B:
        res = i
        break
print(res)
import math

eight, ten = map(int, input().split())

eight_price = eight / 0.08
ten_price = ten / 0.1

if eight_price >= ten_price:
    bigger = eight_price
    if (bigger // 10) != ten:
        print("-1")
    else:
        print(math.ceil(bigger))
else:
    bigger = ten_price
    if (bigger * 8 // 100) != eight:
        print("-1")
    else:
        print(math.ceil(bigger))
import math
A,B = map(int,input().split())
c = 0
for i in range(math.ceil(A/0.08),math.floor((A+0.99)/0.08)+1):
    if c == 1:
        break
    for j in range(math.ceil(B/0.1),math.floor((B+0.99)/0.1)+1):
        if i == j:
            print(i)
            c = 1
            break
if c == 0:
    print(-1)
import math

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

for i in range(1,1001):
    if i*8//100  == a and i//10 == b:
        ans = i
        break
else:
    ans = -1

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

ans = -1
for x in range(1001):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        ans = x
        break
print(ans)
a, b = map(int, input().split())
for i in range(2000):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        break
    if i == 1999:
        print(-1)
#  --*-coding:utf-8-*--

import math

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

x = max(math.ceil(A*100/8), math.ceil(B*10))

if math.floor(x*0.08) != A or math.floor(x*0.1) != B:
    print(-1)
else:
    print(x)
import sys
from math import floor
input = sys.stdin.readline

def main():
    a,b=map(int,input().split())
    u=max(floor((a+1)/0.08)+1,floor((b+1)/0.1)+1)
    f=min(floor(a/0.08),floor(b/0.1))
    x=-1
    for i in range(f,u+1):
        if floor(i*0.08)==a and floor(i*0.1)==b:
            x=i
            break
    print(x)

if __name__ == '__main__':
    main()
A, B = map(int, input().split())

import math

for i in range(1,1002):
  if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
    print(i)
    break
  elif i == 1001:
    print(-1)
import math
a, b = map(int, input().split())
for i in range(20000):
    if (math.floor(i * 8 / 100), math.floor(i / 10))\
        == (a, b):
        print(i)
        exit()
    
print(-1)
a,b = list(map(int,input().split()))

ans = -1

for i in range(1,10100):
  if i // 12.5== a and i // 10 == b:
    ans = i
    break

print(ans)
import math
A,B=map(int,input().split())
ans=-1
for i in range(1,10001):
    n1=int(math.floor(i * 0.08))
    n2=int(math.floor(i * 0.1))

    if n1 == A and n2 == B:
        ans=i
        break

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

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

print(-1)
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

    for i in range(100000):
        if i * 8 // 100 == A and i // 10 == B:
            print(i)
            return
    else:
        print(-1)


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

x_a_min = a/0.08
x_a_max = (a+1)/0.08
x_b_min = b/0.1
x_b_max = (b+1)/0.1

if math.ceil(max(x_a_min,x_b_min))<math.ceil(min(x_a_max,x_b_max)):
    print(math.ceil(max(x_a_min,x_b_min)))
else:
    print(-1)
a,b =map(int,input().split())
for i in range(1,1001):
        if 8*i//100 == a and i//10 == b:
                print(i)
                exit()
print('-1')
import math
A, B = map(int, input().split())
V = 10000
for i in range(1, 10001):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    if a == A and b == B:
        # print(a)
        # print(b)
        if V > i:
            V = i
        else:
            continue
    else:
        continue
if V == 10000:
    print(-1)
else:
    print(V)
##C
A,B = map(int,input().split())
A1 = list()
B1 = list()
for i in range(1,1250):
    if int(i*0.08) == A:
        A1.append(i)
for j in A1:
    if int(j*0.1) == B:
        B1.append(j)
if not B1:
    print(-1)
else:
    print(min(B1))
A, B = map(int, input().split())
ans = []
for i in range(1, 15000):
    if int(i * 8 / 100) == A and int(i * 10 / 100) == B:
        ans.append(i)
if ans:
    print(ans[0])
else:
    print(-1)
a, b = [int(i) for i in input().split()]

import math
a_ans = list(range(math.ceil(a*12.5), math.ceil((a+1)*12.5)))
b_ans = list(range(b*10, (b+1)*10))

l_ans = sorted(list(set(a_ans) & set(b_ans)))

if len(l_ans) == 0:
  print(-1)
else:
  print(l_ans[0])
import math
A, B = map(int, input().split())
for i in range(1,1250):
    if math.floor(i * 0.08) == A:
        if math.floor(i * 0.1) == B:
            print(i)
            break
else:
    print(-1)
import math
A, B = map(int, input().split())

for i in range(10**4):
    if math.floor(i * 0.08) == A and math.floor(i*0.1) == B:
        print(i)
        break
else:
    print(-1)
A, B = map(int, input().split())
ans = 0
for k in range(1001):
  if int(ans*0.08) == A and int(ans*0.1) ==B:
    print(ans)
    exit()
  else:
    ans += 1
print(-1)
A,B = map(int,input().split())
if A > B:
    A,B = B,A

def no_tax(tax,tax_r):
    origin,min,max = 0,0,0
    while int(origin*tax_r) < tax:
        origin += 1
    min = origin
    while int(origin*tax_r) <= tax:
        origin += 1
    max = origin-1
    return (min,max)

A_min,A_max,B_min,B_max = \
no_tax(A,0.08)[0],no_tax(A,0.08)[1],no_tax(B,0.1)[0],no_tax(B,0.1)[1]

if A_min <= B_max and B_min <= A_max:
    print(max(A_min,B_min))
else:
    print(-1)
a,b=map(float,input().split())
 
import math 
 
x=a//0.08 
 

f=0
for i in range(100000):
    x=i
    
 
    if a==math.floor(x*0.08) and b==math.floor(x*0.1) :
        print(i)
        f=1
        break
if f==0:
    print(-1)
import sys
import math
A, B = map(int, input().split())
for i in range(1, 1501):
    if (math.floor(i*0.08) == A) and (math.floor(i*0.1) == B):
        print(i)
        sys.exit()
print(-1)
A, B = [int(v) for v in input().split()]

res = -1
for i in range(1000,0,-1):
    if (i*8)//100 == A and (i*10)//100 == B:
        res = i

print(res)
a, b = map(int, input().split())
for i in range(1, 10**5):
    if (i*8) // 100 == a and i // 10 == b:
        print(i)
        exit()
print(-1)
# import math
a, b = map(int, input().split(' '))

# ans = math.ceil(a*12.5)
# if int(ans*0.1) != b:
#     print('-1')
#     exit()

# print(ans)

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

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

list1 = []
list2 = []

border1 = math.ceil(A/0.08)
border2 = math.ceil((A+1)/0.08-1)
border3 = math.ceil(B/0.1)
border4 = math.ceil((B+1)/0.1-1)

for i in range(border1,border2+1,1):
    list1.append(i)
for j in range(border3,border4+1,1):
    list2.append(j)
    
list3 = list(set(list1) & set(list2))

if bool(list3)==True:
    print(min(list3))
else:
    print('-1')
a,b = map(int,input().split())
if int(a/(0.08)) == int(b/(0.1)):
    mn = int(a/(0.08))
else:
    inter = abs(int(a/(0.08)) - int(b/(0.1)))
    mn = min(int(a/(0.08)) , int(b/(0.1)))
             
    for i in range(inter*2):
        if int(mn*(0.08))==a:
            if int(mn*(0.1))==b:
                break
        mn += 1
        if i ==inter*2-1:
            mn = -1
print(mn)
import sys
a, b = map(int,input().split())
B = 10 * b
ans = -1
for i in range(10):
  if (int((B + i) * 0.08) == a):
    ans = B + i
    break
print(ans)
A, B = map(int, input().split())

for i in range(1, 10000):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
print(-1)
import math

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

tax1=math.ceil(max(12.5*a,10*b))
tax2=math.floor(min(12.5*(a+1),10*(b+1)))

if tax2>tax1:
    print(tax1)
else:
    print(-1)
from sys import stdin
input = stdin.readline


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

  for i in range(10000):
    if int(i * 0.08) == A and \
       int(i * 0.10) == B:

      print(i)
      return
  print(-1)


if(__name__ == '__main__'):
  main()
A, B = map(int, input().split())

for i in range(1, 1101):
  if int(i*0.08) == A and int(i*0.10) == B:
    print(i)
    break
else:
  print(-1)
#n=int(input())
a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

import math
flag=False
ans=-1
for i in range(1,10001):
    a2=i*0.08
    a1=int(i*0.08)
    b1=int(i*0.1)

    if a1==a and b1==b:
        ans=i
        break
print(ans)
a,b=map(int,input().split())
if ((25*a)+1)//2 > 10*b+9 or ((25*(a+1))-1)//2  < 10*b:
    print(-1)
else:
    print(max(10*b,((25*a)+1)//2))
a, b = map(int, input().split())
for x in range(1, 1010):
    if int(x*0.08)==a and int(x*0.10)==b:
        print(x)
        exit()
print(-1)
import sys
input = sys.stdin.readline


def main():
    a, b = map(int, input().split())
    for i in range(1250+1):
        a_ = int(i * 0.08)
        b_ = int(i * 0.1)
        if a == a_ and b == b_:
            print(i)
            return
    print(-1)


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

for i in range(10000):
    a = int(i * 1.08) - i
    b = int(i * 1.10) - i
    if a == A and b == B:
        print(i)
        exit()

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

S = B * 10
ans = -1

while S < (B+1) * 10:
    if int(S*0.08) == A:
        if ans != -1:
            ans = min(ans, S)
        else:
            ans = S
    S += 1

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

e_min = a/0.08
e_max = (a+1)/0.08

t_min = int(b/0.1)
t_max = int((b+1)/0.1)

num = -1
for i in range(t_min, t_max):
  if i >= e_min and e_max > i:
    num = i
    break
    
print(num)
A, B = map(int, input().split())

for i in range(1101):
    if int(i*0.08) == A and int(i*0.10) == B:
        print(i)
        break
    elif i == 1100:
        print("-1")
import math
A,B=map(int,input().split())
for i in range(1,1010):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        print(i)
        exit()
print(-1)
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    for i in range(1, 1251):
        if i * 0.1 // 1 == b and i * 0.08 // 1 == a:
            return i
    return -1

if __name__ == '__main__':
    ans = main()
    print(ans)
a,b = map(int,input().split())
low = int(min(a//0.08,b//0.1))
high = int(max((a+1)//0.08,(b+1)//0.1))
for i in range(low,high+1):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i);  break
else:
    print(-1)
a,b=map(int,input().split())

for i in range(1,10000):
    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 i in range(1,1001):
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    break
else:
  print(-1)
def resolve():
    a, b = map(int, input().split())
    for i in range(1, 1010):
        if int (i * 0.08) == a and int(i*0.1) == b:
            return print(i)
    print(-1)

if __name__ == '__main__':
    resolve()
a, b = map(int, input().split())

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

print(ans)
def main():
    A, B = list(map(int, input().split()))
    for i in range(1010):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            return i
    return -1
   

print(main())
import math
from decimal import *
A,B=list(map(lambda i:int(i),input().split()))


Amax = (A+0.9)
Amax= Decimal(str(Amax))/ Decimal('0.08')
Amin = Decimal(str(A))/ Decimal('0.08')


Bmax= (B+0.9)
Bmax= Decimal(str(Bmax)) *  Decimal('10')
Bmin = Decimal(str(B)) *  Decimal('10')

As = list(range(math.ceil(Amin), math.floor(Amax)+1))
Bs = list(range(math.ceil(Bmin), math.floor(Bmax)+1))

A_B = set(As) & set(Bs)


if len(A_B)==0:
    print(-1)
else:
    print(min(A_B))
import math
a,b=map(int,input().split())
flag=True
for i in range(10**6):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        flag=False
        exit()
if flag:
    print(-1)
a,b = map(int,input().split())

bb = b * 10

ans = -1
for i in range(bb, bb+10):
    if i*8//100==a:
        ans=i
        break

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

for i in range(1251):
    a=(i*1.08)//1-i
    b=(i*1.1)//1-i

    if a==A and b==B:
        print(i)
        exit()
print(-1)
a, b = map(int, input().split())

for p in range(1010):
    if int(p*0.08) == a and int(p*0.1) == b:
        print(p)
        exit()

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

ans = -1

for i in range(13, 1001):
  if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B :
    ans = i
    break

print(ans)
from math import ceil 
A, B = map(int,input().split())
def non_taxed_price_8(x):
    min_8 = x*12.5
    Max_8 = (x+1)*12.5
    eight = set(range(ceil(min_8), ceil(Max_8)))
    return eight

def non_taxed_price_10(x):
    min_10 = x*10
    Max_10 = (x+1)*10
    ten = set(range(ceil(min_10), ceil(Max_10)))
    return ten

a = non_taxed_price_8(A)
b = non_taxed_price_10(B)

r = a&b
if len(r) == 0:
    print(-1)
else:
    print(min(list(r)))
import math
a, b = map(int, input().split())
K = [i for i in range(10, 1251)]
ans = -1
for k in K:
    if math.floor(k*0.08) == a and math.floor(k*0.1) == b:
        ans = k
        break
print(ans)
A, B = map(int, input().split())

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

for i in range(1,1001):
    x = math.floor(0.08 * i)
    y = math.floor(0.1 * i)
    if x == a and y == b:
        print(i)
        sys.exit()
print(-1)
a, b = map(int,input().split())
start = -(-b//0.1)
ans = 0
for i in range(int(start),int(start+10)):
    
    if int(i * 0.08) == a:
        ans = i
        break
if ans ==0:
    ans = -1
        
print(ans)
import sys

s = sys.stdin.readline().split()

a, b = map(int, s)
orig_a = a/0.08
if int(orig_a) < orig_a:
    left = int(orig_a) + 1
else:
    left = int(orig_a)
right = left + 1
while True:
    if int(right * 0.08) > a:
        break
    right += 1
for i in range(left, right):
    if int(i * 0.1) == b:
        print(i)
        sys.exit(0)
print(-1)
A, B=list(map(int, input().split()))
for n in range(10001):
    tax_A = n*8//100
    tax_B = n*10//100
    if A==tax_A and B==tax_B:
        print(n)
        exit()
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)
        break
else:
    print(-1)
def main():

    A, B = map(int, input().split())
    for v in range(0, 100000):
        if int(v * 0.08) == A and int(v * 0.1) == B:
            return v
    return -1

if __name__ == '__main__':
    print(main())
a, b = map(int, input().split())
a *= 25
b *= 10
r = max((a + 1) // 2, b)
print((-1, r)[r < min((a + 26) // 2, b + 10)])
a,b=map(int,input().split())
for i in range(1,1251):
    if a==(i*0.08)//1 and b==(i*0.1)//1:
        print(i)
        exit()
print(-1)
from math import ceil

A, B = map(int, input().split())
x = max(ceil(A / 0.08), ceil(B / 0.1))
if x < (A + 1) / 0.08 and x < (B + 1) / 0.1:
    print(x)
else:
    print(-1)
A,B=map(int,input().split())

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

n=1
while n<=10**6:
  if int(n*0.08)==a and int(n*0.1)==b:
    print(n)
    exit()
  else:
    n+=1
print(-1)
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a,b = inm()
for i in range(1,11000):
    if (i*8)//100==a and (i*10)//100==b:
        print(i)
        exit()
print(-1)
A, B = map(int, input().split())
ans = -1
for i in range(1010):
    #print([i, int(i*0.08), int(i*0.1)])
    if (A==int(i*0.08)) & (B==int(i*0.1)):
        ans = i
        break
print(ans)
A, B = map(int, input().split(' '))
for i in range(1500):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        break
else:
    print(-1)
a, b = map(int, input().split())
a_min = int(a / 0.080 + 0.9)
a_max = int((a + 0.9) / 0.080)
b_min = int(b / 0.100 + 0.9)
b_max = int((b + 0.9) / 0.100)
if a_max < b_min or b_max < a_min:
    ans = -1
elif a_min <= b_min:
    ans = b_min
elif b_min <= a_min:
    ans = a_min
print(ans)
A,B=[int(x) for x in input().rstrip().split()]
count=0
for i in range(1,20000):
    ans1=int(0.08*i)
    ans2=int(0.1*i)
    if ans1==A and ans2==B:
        print(i)
        count=1
        break
if count==0:
    print(-1)
from math import floor
A, B = map(int, input().split())
for i in range(1000):
    if floor((i + 1) * 0.08) == A and floor((i + 1) * 0.1) == B:
        print(i + 1)
        exit()

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

down_a = math.ceil(A / 0.08)
up_a = math.ceil((A+1) / 0.08)
down_b = int(B / 0.1)
up_b = int((B+1) / 0.1)

a = [i for i in range(down_a, up_a)]
b = [j for j in range(down_b, up_b)]

ans = -1
for num in a:
  if num in b:
    ans = num
    break;
print(ans)
a, b = map(int, input().split())
x = -1
for i in range(1, 1001):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        x = i
        break
print(x)
A, B = map(int, input().split())
for i in range(1, 10001):
    if int(i*0.08) == A and int(i*0.1) == B:
        print(i)
        break
else:
    print(-1)
import math
a, b = list(map(int, input().split()))

price = math.ceil(a / 0.08)
#print(price)
price_ = math.floor(b / 0.1)
#print(price_)
if price < price_:
    start, end = price, price_
else:
    start, end = price_, price
for i in range(start, end+1):
    #print(math.floor(i * 0.08),math.floor(i * 0.1))
    #print(i)
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        exit()
if price == price_:
    print(price)
    exit()
print(-1)
import math
A, B = input().split()
A = float(A)
B = float(B)

cand_a = math.ceil(12.5*A)
cand_b = math.ceil(10*B)
max_a = math.floor(12.5*(A + 1))
max_b = math.floor(10*(B + 1))

if cand_a > cand_b:
    if cand_a < max_b:
        ans = cand_a
    else:
        ans = -1
elif cand_b > cand_a:
    if cand_b < max_a:
        ans = cand_b
    else:
        ans = -1
else:
    ans = cand_a

print(ans)
A, B = map(int, input().split())
x = 0
while int(x * 0.08) <= A or int(x * 0.1) <= B:
    x += 1
    if int(x * 0.08) == A and int(x * 0.1) == B:
        print(x)
        exit()
print(-1)
import math 
a, b = map(int,input().split())
result = -1

for i in range(1,1001):
    pa = math.floor(i * 0.08)
    pb = math.floor(i * 0.1)

    if pa == a and pb == b :
        result = i
        break
print(result)
import math

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

INF = 10**4
for x in range(INF):
    if math.floor(x * 0.08) == A:
        if math.floor(x * 0.10) == B:
            print(x)
            exit()

print(-1)
import sys
input = lambda: sys.stdin.readline().rstrip() 
import math

def resolve():
    A, B = map(int, input().split())
    ans = -1
    for i in range(2000):
        if math.floor(i*0.08)==A and math.floor(i*0.10)==B:
            ans = i
            break
    print(ans)


if __name__ == '__main__':
    resolve()
import math
AB = list(map(int, input().split()))

N2min = AB[1] * 10
N2max = AB[1] * 10 + 9

N1min = int(AB[0] * 12.5)
N1max = int((AB[0] + 0.9) * 12.5)
if (N2min <= N1max) and (N1min <= N2max):
    if (N1min < N2min):
        print(N2min)
    else:
        i = 0
        while (int((N1min - i) * 0.08) == AB[0]):
            i += 1
        print(N1min - i + 1)
else:
    print(-1)
# coding: utf-8
a, b = map(int, input().split())

for i in range(1250):
    if int(0.08*i) == a and int(0.1*i) == b:
        print(i)
        break
    else:
        if i == 1249:
            print(-1)
        i += 1
import math
A,B=map(int,input().split())
for i in range(10**5):
    a=math.floor(i*0.08)
    b=math.floor(i*0.10)
    if a==A and b==B:
        print(i)
        exit()
    if a>A or b>B:
        print(-1)
        exit()