Problem:
 Score : 300 points    Problem Statement Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)  Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.  If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print -1 .      Constraints  1 \leq A \leq B \leq 100  A and B are integers.         Input Input is given from Standard Input in the following format:  A  B       Output If there is a price that satisfies the condition, print an integer representing the lowest such price; otherwise, print -1 .        Sample Input 1 2 2      Sample Output 1 25  If the price of a product before tax is 25 yen, the amount of consumption tax levied on it is:   When the consumption tax rate is 8 percent: \lfloor 25 \times 0.08 \rfloor = \lfloor 2 \rfloor = 2 yen.  When the consumption tax rate is 10 percent: \lfloor 25 \times 0.1 \rfloor = \lfloor 2.5 \rfloor = 2 yen.   Thus, the price of 25 yen satisfies the condition. There are other possible prices, such as 26 yen, but print the minimum such price, 25 .       Sample Input 2 8 10      Sample Output 2 100  If the price of a product before tax is 100 yen, the amount of consumption tax levied on it is:   When the consumption tax rate is 8 percent: \lfloor 100 \times 0.08 \rfloor = 8 yen.  When the consumption tax rate is 10 percent: \lfloor 100 \times 0.1 \rfloor = 10 yen.        Sample Input 3 19 99      Sample Output 3 -1  There is no price before tax satisfying this condition, so print -1 .

Solution (Python):
import math
A,B = map(int,input().split())
if (A+1)/0.08 > B/0.1 and (B+1)/0.1 > A/0.08:
    print(max(math.ceil(A/0.08),math.ceil(B/0.1)))
else:
    print(-1)

Solution (Python):
from math import floor
a, b = map(int, input().split())

for i in range(10000):
    za = floor(i * 8 / 100)
    zb = floor(i * 10 / 100)
    if (a == za and b == zb):
        print(i)
        break
else:
    print(-1)

Solution (Python):
A, B = map(int, input().split())
for n in range(1, 1001):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    print(n)
    exit()
print(-1)

Solution (Python):
import math
a, b = map(int, input().split(' '))

ans = range(math.ceil(a*12.5), math.ceil((a+1)*12.5))
for i in ans:
    if int(i*0.1) == b:
        print(i)
        exit()
print('-1')

Solution (Python):

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








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

print('-1')

Solution (Python):
from math import floor

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

for i in range (1001):
    if floor(i*0.08) == a and floor(i*0.1) == b:
        print (i)
        break
        
    elif i == 1000:
        print(-1)
        break

    else:
        continue

Solution (Python):
a,b=map(int,input().split())
for i in range(10000):
    if i*8//100 == a and i//10 == b:
        print(i)
        exit()
print(-1)

Solution (Python):
import math
a,b = map(int,input().split())
 
count = 0
for i in range(1,1001):
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    exit()
  else:
    count += 1
if count > 99:
  print(-1)

Solution (Python):
import math

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

lA = math.ceil(A / 0.08)
uA = (A + 1) / 0.08
if uA.is_integer():
    uA = int(uA) - 1
else:
    uA = int(uA)

lB = math.ceil(B / 0.1)
uB = (B + 1) / 0.1
if uB.is_integer():
    uB = int(uB) - 1
else:
    uB = int(uB)

if uA < lB or uB < lA:
    print(-1)
else:
    print(max(lA, lB))

Solution (Python):
A,B=input().split()
A=int(A)
B=int(B)
price1_min=A/0.08
price1_max=(A+1)/0.08
price2_min=B/0.1
price2_max=(B+1)/0.1

if price2_min>=price1_max or price1_min>=price2_max:
    print(-1)

else:
    price=max(price1_min,price2_min)
    if price==int(price):
        print(int(price))
    else:
        print(int(price)+1)

Solution (Python):
a,b = map(int,input().split())
x1 = int((a-1)/0.08)
x2 = int((a+1)/0.08)
y1 = int((b-1)/0.1)
y2 = int((b+1)/0.1)
x = []
for i in range(x1, x2+1):
    if int(i*0.08) == a:
        x.append(i)
y = []
for i in range(y1, y2+1):
    if int(i*0.1) == b:
        y.append(i)
for i in x:
    if i in y:
        print(i)
        break
else:
    print(-1)

Solution (Python):
import math

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

x_min = a / 0.08
x_max = (a + 1) / 0.08

y_min = b / 0.1
y_max = (b + 1) / 0.1

x_list = list(range(math.ceil(x_min), math.floor(x_max) + 1))
if x_max == math.floor(x_max):
    x_list.pop(-1)

y_list = list(range(math.ceil(y_min), math.floor(y_max) + 1))
if y_max == math.floor(y_max):
    y_list.pop(-1)


matome = set(x_list) & set(y_list)
matome = list(matome)


if not matome:
    print(-1)
else:
    print(min(matome))

Solution (Python):
A,B=map(int,input().split())
price=-1
for i in range(1009):
  x1=int((i+1)*0.08)
  x2=int((i+1)*0.1)
  if ((A==x1) and (B==x2)):
    price=i+1
    break
print(price)

Solution (Python):
import math
A,B = map(int,input().split())
C = math.ceil(100*A/8)

if A % 2 == 0:
  D = math.floor(100*(A+1)/8)
else:
  D = math.floor(100*(A+1)/8)-1
  
for X in range(C,D+1):
  if B == math.floor(10*X/100):
    print(X)
    break
else:
  print(-1)

Solution (Python):
A, B = map(int, input().split())

table = []
for x in range(1010):
    a = int(x * 0.08)
    b = int(x * 0.10)
    table.append((a, b))

res = -1
for x in range(1010):
    a, b = table[x]
    if a == A and b == B:
        res = x
        break

print(res)

Solution (Python):
import numpy as np

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

xa_min = 12.5 * A
xa_max = 12.5 * (A+1)
xb_min = 10 * B
xb_max = 10 * (B+1)

x_min = np.ceil(max(xa_min, xb_min))
x_max = np.floor(min(xa_max, xb_max))

if x_min >= x_max:
	print(-1)
else:
	print(int(x_min))

Solution (Python):
from math import floor
a, b = map(int, input().strip().split())

for x in range(2000):
    if floor(x * 0.08) == a and floor(x * 0.1) == b:
        print(x)
        break
else:
    print(-1)

Solution (Python):
M = input().split()

a = int(M[0])
b = int(M[1])

x = 10 * b
ans = -1


while (x < 10 * (b + 1)) and (ans == -1):
  if int(x * (1 / 10)) != b:
    x += 1
  else:
    ans = x

ans = -1

if x < (a + 1) * (25 / 2):
  while (x < (a + 1) * (25 / 2)) and (ans == -1 ):
    if int(x * (2 / 25)) == a:
      ans = x
    else:
      x += 1

  if int(x * (1 / 10)) == b:
    ans = x
  else:
    ans = -1

print(ans)

Solution (Python):




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

    base = b * 10
    for i in range(10):
        r = int((base + i) * 0.08)
        if r == a:
            print(base + i)
            return
    print(-1)


if __name__ == '__main__':
    main()

Solution (Python):
import math
import sys


alpha,beta = map(int, input().split())
    
for i in range(1010):
    sierra = math.floor(i*0.08)
    tango = math.floor(i*0.10)
    if sierra == alpha and tango == beta:
            print(i)
            break
else:
    print(-1)

Solution (Python):




a, b = map(int, input().split())
for i in range(10000):
    za = (8*i)//100
    zb = (10*i)//100
    if za == a and zb == b:
        print(i)
        exit()
print(-1)

Solution (Python):
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))):
  
  if int(i*0.08) == A and int(i*0.10) == B:
    print(i)
    break
else:
  print(-1)

Solution (Python):
a, b = map(int, input().split())
import math

for i in range(1250):
    i += 1

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

Solution (Python):
import math

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

Solution (Python):


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

n = 0

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

Solution (Python):
import math
a, b = list(map(int, input().split()))

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

Solution (Python):
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)

Solution (Python):
from math import floor
a,b=map(int, input().split())
x=0
for i in range(1001):
  if a==floor(i*.08) and b==floor(i*.1):
      x=i
      break
print(x if x else -1)

Solution (Python):
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))

Solution (Python):
x, y = map(int, input().split())
i1 = x * 12.5
i2 = y * 10
i1 += 0.5
i1 //= 1
z = max(i1, i2)
if z // 12.5 != x or z // 10 != y:
    print(-1)
else:
    print(int(z))

Solution (Python):
a,b=list(map(int,input().split()));b*=10;l=[i for i in range(b,b+10) if int(i*0.08)==a];print(-1 if len(l)==0 else min(l))

Solution (Python):
a, b = map(float, input().split())
lowest = max([-(-a // 0.08), -(-b // 0.1)])
highest = min([-(-(a+1) // 0.08), -(-(b+1) // 0.1)])
answer = -1
for target in range(int(lowest), int(highest+1)):
	cand = [(target*0.08)//1, (target*0.1)//1]
	if cand == [a, b]:
		answer = int(target)
		break
print(answer)

Solution (Python):
import math


def solve(a, b):
    for i in range(2000):
        if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
            return i

    return -1


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

print(solve(A, B))

Solution (Python):
a,b=map(int,input().split())
ans=-1
for i in range(10*b,10*(b+1)):
    if int(i*0.08)==a:
        ans=i
        break
print(ans)

Solution (Python):
a,b = map(int,input().split())

total = int(max(-(-a//0.08),-(-b//0.1)))
for i in range(1,total+1):
  y1 = int(i * 0.08)
  y2 = int(i * 0.1)
  if y1 == a and y2 == b:
    print(i)
    exit()
print("-1")

Solution (Python):
a, b = (int(x) for x in input().split())

c_list = []
b_list = []


def f(n, tax, list):
    limit = n + 1
    while(n < limit):
        list.append(int(n / tax))
        n += tax / 2

f(b, 0.1, b_list)

for i in b_list:
    tmp = int(i * 0.08)
    if(tmp == a):
        c_list.append(i)



if(len(c_list) == 0):
    print(-1)
else:
    print(int(min(c_list)))

Solution (Python):
A, B = map(int,input("").split(" "))
value = int(A*12.5) -1
ans = -1
while True:
  value += 1
  tax_1 = int(value*0.08)
  tax_2 = int(value*0.10)
  if tax_1 == A and tax_2 == B:
    ans = value
    break
  elif tax_1 > A and tax_2 > B:
    break
print(ans)

Solution (Python):
import math
A,B = input().split()
A_i = int(A)
B_i = int(B)
C = []
for i in range(1100):
    if math.floor(i * 0.08) == A_i and math.floor(i *0.1) == B_i:
        C.append(i)
    else:
        pass
if not C:
    print(-1)
else:
    print(C[0])

Solution (Python):
import math
a, b = [int(i) for i in input().split()]
 
a_min = math.ceil(a * 12.5)
a_max = int((a+1) * 12.5 - 10e-10)
 
b_min = math.ceil(b * 10 )
b_max = int((b+1)*10 - 10e-10)

  
if a_max < b_min:
  print(-1)
  exit()
  
if b_max < a_min:
  print(-1)
  exit()
  
if a_min <= b_min:
  print(b_min)
  exit()
print(a_min)

Solution (Python):
import math
a,b=map(int,input().split())
for i in range(2000):
  if math.floor((i+1)*0.08)==a and math.floor((i+1)*0.1)==b:
    print(i+1)
    exit()
print(-1)

Solution (Python):
import math
a, b = map(int,input().split())

for i in range(1,100000):
    if math.floor(i*8/100)==a and math.floor(i*10/100)==b:
        print(i)
        exit()
print(-1)

Solution (Python):
import math
a,b=map(int,input().split())
a_down=math.ceil(a/0.08)
a_up=math.ceil((a+1)/0.08)
b_down=math.ceil(b/0.1)
b_up=math.ceil((b+1)/0.1)

for i in range(a_down,a_up):
  if i >= b_down and i < b_up:
    answer=i
    break
  else:
    answer=-1
print(answer)

Solution (Python):
import math
A, B = map(int, input().split())
for i in range(1, 1200):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        exit()
    else:
        pass
print(-1)

Solution (Python):
a, b = map(int, input().split())

a_min = a / 0.08
a_max = (a + 1) / 0.08
b_min = b / 0.1
b_max = (b + 1) / 0.1

if max(a_min, b_min) < min(a_max, b_max):
    ans = max(a_min, b_min)
    ans = int(ans) if (ans - int(ans)) == 0 else int(ans) + 1
else:
    ans = -1

print(ans)

Solution (Python):
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)

Solution (Python):
a,b = map(int,input().split())

ma = 20000

for i in range(1, ma):
	p1 = i * 0.08
	p2 = i * 0.1
	if a <= p1 < a+1 and b <= p2 < b+1:
		print(i)
		exit()
print('-1')

Solution (Python):
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)

Solution (Python):
A,B=map(int,input().split())
res=[]
for n in range(1,1251):
    a=n*0.08; b=n*0.1
    if (A<=a<A+1)&(B<=b<B+1):
        res.append(n)
print(-1 if len(res)==0 else min(res))

Solution (Python):
A, B = map(int, input().split())

i = 1
while True:
    
    if i >= 1010:
        print(-1)
        break
    
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        break
        
    i += 1

Solution (Python):
import math
A, B = map(int, input().strip().split())
def helper(val):
  return math.floor(val * 0.08) == A and math.floor(val * 0.1) == B

i = 0
while i < 1100:
  if helper(i):
    print(i)
    exit()
  i += 1

print(-1)

Solution (Python):
import math
x,y=map(int,input().split())

for i in range(1010):
    if math.floor(i*0.08)==x and math.floor(i*0.1)==y:
        print(i)
        exit()
print(-1)

Solution (Python):
import math
a, b = map(int, input().split())

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

Solution (Python):
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) - 1
bmin = math.ceil(B * 10)

if amin > bmax or bmin > amax:
    print(-1)
else:
    print(int(max(amin, bmin)))

Solution (Python):
import math
a,b = map(int, input().split())
ls = [b*10+i for i in [0,1,2,3,4,5,6,7,8,9]]
t = 0
for x in ls:
    if a == math.floor(x*8/100):
        print(x)
        break
    else:
        t += 1
        
if t == 10:
    print(-1)

Solution (Python):
a, b = map(int, input().split())
for num in range(1, 1252):
    if int(num * 0.08) == a and int(num * 0.10) == b:
        break
if num == 1251:
    print(-1)
else:
    print(num)

Solution (Python):
import math

A, B = [int(i) for i in input().split()]
taxA, taxB = [0.08, 0.1]

ans = -1
for i in range(1250):
    if math.floor(i * taxA) == A and math.floor(i * taxB) == B:
        ans = i
        break

print(ans)

Solution (Python):
a, b = map(int, input().split())
res = -1
for i in range(b * 10, (b + 1) * 10):
    if i * 0.08 >= a and i * 0.08 < a + 1 :
        res = i
        break
print(res)

Solution (Python):
import sys
import math

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

for i in range(1,10001):
  if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
    print(i)
    sys.exit()
    
print('-1')

Solution (Python):
import sys
import math

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

for i in range(1,10000):
  if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
    print(i)
    sys.exit()
    
print('-1')

Solution (Python):
import math
a, b = map(int, input().split())
lsta = list(range(math.ceil(a/0.08), math.ceil((a+1)/0.08)))
lstb = list(range(math.ceil(b/0.1), math.ceil((b+1)/0.1)))
for la in lsta:
  for lb in lstb:
    if la==lb:
      print(la)
      exit()
print(-1)

Solution (Python):
import sys
import math

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

for i in range(1, 1010):
	x = math.floor(i * 0.08)
	y = math.floor(i * 0.10)
	if x == A and y == B:
		print(i)
		sys.exit(0)

print(-1)

Solution (Python):
import sys
import math

number = list(map(int, input().split()))
expect = 0.0

for i in range(1500):
    expect += 1
    if int(expect*0.08) == number[0] and int(expect*0.1) == number[1]:
        print(int(expect))
        sys.exit()

print(-1)

Solution (Python):
A, B =map(int, input().split())
M=int(-1)
for i in range(1001):
    if int(i*0.08)==A:
        if int(i*0.10)==B:
            M=i
            break

print(M)

Solution (Python):
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)
    exit()

print(-1)

Solution (Python):
A,B=map(int,input().split())
ret = -1
for i in range(2000):
  if A==int(i*0.08) and B==int(i*0.1):
    ret = i
    break
print(ret)

Solution (Python):
a,b = map(int, input().split())
def c(x,r):
    return int(-(-x//r))
a1,a2 = c(a,.08), c(a+1,.08)-1
b1,b2 = c(b,.1), c(b+1,.1)-1
if a1 > b2 or b1 > a2:
    print(-1)
else:
    print(max(a1,b1))

Solution (Python):
import math

a,b = map(int, input().split())
t = 1
x = False
y = False
z = False

while t <= 10000:
    c = math.floor(t * 0.08)
    d = math.floor(t * 0.1)
    
    if c == a:
        x = True
    else:
        x = False
        
    if d == b:
        y = True
    else:
        y = False
        
    if x and y:
        print(t)
        z = True
        break
        
    t = t + 1

if z == False:
    print('-1')

Solution (Python):
import math 
A,B = map(int,input().split()) 

price = []
x = int(A/0.08)

y = int(B/0.1)
for i in range(min(x,y),10001):
	if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
		price.append(i)	
		break
		
if len(price) == 0:
	print(-1)
else:
	print(min(price))

Solution (Python):
import math 
A,B = map(int,input().split()) 

price = []
x = int(A/0.08)

y = int(B/0.1)
for i in range(min(x,y),10001):
	if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
		price.append(i)	
		break
		
if len(price) == 0:
	print(-1)
else:
	print(min(price))

Solution (Python):
import math
 
A, B = map(int, input().split())
ans = -1
 
for i in range(int(min(A/0.08, B/0.1)), 10001):
  if math.floor(i * 0.08) == A and math.floor(i * 0.10) == B:
    ans = i
    break
    
print(ans)

Solution (Python):
import math
a, b = map(int, input().split())
for n in range(10000):
    x = math.floor(n * 0.08)
    y = math.floor(n * 0.1)
    if a == x and b == y:
        print(n)
        exit()
print(-1)

Solution (Python):
import math

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

for i in range(int(min(A * 12.5, B * 10)), 10001):
  if math.floor(i * 0.08) == A and math.floor(i * 0.10) == B:
    ans = i
    break
    
print(ans)

Solution (Python):
import math

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



x=[]
for i in range(10000):
	if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
		x.append(i)

if not len(x)==0:
	print(min(x))
else: print("-1")

Solution (Python):
import math

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

a = []
b = []

for i in range(1,1001):
  if math.floor(i*0.08) == A:
    a.append(i)
    
  else:
    pass

for i in range(1,1001):
  if math.floor(i*0.1) == B:
    b.append(i)
    
  else:
    pass
   
a_and_b = set(a) & set(b)


if len(a_and_b) == 0:
  print(-1)
else:
  print(min(a_and_b))

Solution (Python):



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



X1=A/0.08
X2=(A+0.999)/0.08

Y1=B/0.10
Y2=(B+0.999)/0.10







import math


X1=math.ceil(X1)
Y1=math.ceil(Y1)


X2=math.floor(X2)
Y2=math.floor(Y2)


for i in range(X1,X2+1):
    if Y1<=i and i<=Y2:
        print(i)
        exit()

print("-1")

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

Solution (Python):
import sys
import numpy as np
A, B = map(int,input().split())
amin, amax = A / 0.08, (A + 1) / 0.08
bmin, bmax = B / 0.10, (B + 1) / 0.10

if amax <= bmin or bmax <= amin:
    print(-1)
    sys.exit()

ans = np.ceil(max(amin, bmin)).astype(int)

if ans >= amax or ans >= bmax:
    print(-1)
else:
    print(ans)

Solution (Python):
import math
import sys
 
a,b = map(int,input().split())
 
a_min = math.ceil(a/0.08)
a_max = math.ceil((a+1)/0.08-1)
 
b_min = math.ceil(b/0.1)
b_max = math.ceil((b+1)/0.1-1)
 
a_list = list(range(a_min,a_max+1))
b_list = list(range(b_min,b_max+1))
 
 
for num in a_list:
    if num in b_list:
        print(num)
        sys.exit()
 
print('-1')

Solution (Python):
a, b = map(int, input().split())
ans = -1
for i in range(1, 1250):
    if int(i*0.08) == a and int(i*0.10) == b:
        ans = i
        break
print(ans)

Solution (Python):


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)

Solution (Python):
a,b = map(int,input().split())
ans = -1
for i in range(1010):
    if int(i*0.08) == a and int(i*0.1) == b:
        ans = i
        break
print(ans)

Solution (Python):
import math
A, B = map(int, input().split())
result = 'No'
for i in range(1, 1500):
    eight = math.floor(i * 0.08)
    ten = math.floor(i * 0.10)
    if eight == A and ten == B:
        print(i)
        result = 'Yes'
        break
if result == 'No':
    print(-1)

Solution (Python):
a,b = map(int, input().split())
ans = -1

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

print(ans)

Solution (Python):
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)

Solution (Python):
a, b = map(int, input().split())
for i in range(1, 100000):
    if (a <= i * 0.08 and i * 0.08 < a + 1) and (b <= i * 0.1 and i * 0.1 < b + 1):
        print(i)
        exit()
    else:
        continue

print(-1)

Solution (Python):
a, b = map(int, input().split())
ans = -1
for i in range(1, 1250):
    if int(i/100*8) == a and int(i/10) == b:
        ans = i
        break
print(ans)

Solution (Python):

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

Solution (Python):
import sys
A,B = map(int,input().split(" "))

sentinel1 = 0
N = 1
while sentinel1 < 101:
    sentinel1 = int(N * 0.08)
    sentinel2 = int(N * 0.1)
    if sentinel1 == A:
        if sentinel2 == B:
            print(N)
            sys.exit()
    N = N + 1

print(-1)

Solution (Python):
A, B = map(int, input(). split())
answer = None
flag = False
for i in range(1, 1009):
  
  if (A == (i*0.08)//1) and (B == (i*0.1)//1):
    answer = i
    print(answer)
    flag = True
   
    if flag:
        break
if answer is None:
  answer = -1
  print(answer)

Solution (Python):
A = list(map(int, input().split()))

ans = -1
for i in range(10):
  if (A[1]*10+i)*0.08//1 == A[0]:
    ans = A[1]*10+i
    break
    
print(ans)

Solution (Python):
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)

Solution (Python):
a, b = map(int, input().split())

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

Solution (Python):
import math

a,b=map(int,input().split())
flag=0
for i in range(1,10000):
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    print(i)
    flag=1
    break
if flag==0:
  print(-1)

Solution (Python):
import math
a,b = map(int,input().split())
s = 0
for i in  range(1,1100):
    if (math.floor(i*0.08) == a and math.floor(i*0.1) == b):
        s = i
        break
    s = -1
print(s)

Solution (Python):
a,b = map(int,input().split())

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

if 100*(a+1)%8:
    y=int((a+1)/0.08)
else:
    y=int((a+1)/0.08)-1

    
for i in range(x, y+1):
    if b/0.1 <= i <(b+1)/0.1:
        list.append(i)

        
list = sorted(list)
if list:
    print(list[0])
else:
    print('-1')

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

Solution (Python):


A,B = map(int,input().split())
for i in range(10,1009):
  if(int(i*0.08)==A and int(i*0.1)==B):
    print(i)
    flag=0
    break
  else:
    flag=1
if flag==1:
  print("-1")

Solution (Python):
import math
text = list(map(int, input().split()))

reply = -1
i = 0
while math.floor(i * 0.08) <= text[0] and math.floor(i * 0.1) <= text[1]:
    if math.floor(i * 0.08) == text[0] and math.floor(i * 0.1) == text[1]:
        reply = i
        break
    i += 1
print(reply)

Solution (Python):
A, B = map(int,input().split())
Arate = 0.08
Brate = 0.10

flag = False
for i in range(1,1009):
  tmpA = int(i*Arate)
  tmpB = int(i*Brate)

  if tmpA == A and tmpB == B:
    print(i)
    flag = True
    break


if flag is False: print(-1)

Solution (Python):


import math
import decimal


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

tax8 = decimal.Decimal('0.08')
tax10 = decimal.Decimal('0.1')

ans = -1

for i in range(1, 1100):
    if math.floor(i * tax8) == A and math.floor(i * tax10) == B:
        ans = i
        break

print(ans)

Solution (Python):
a, b = map(int, input().split())
for x in range(1009):
    if int(x*0.08) == a and int(x*0.10) == b:
        print(x)
        exit()
print(-1)

Solution (Python):
A, B = map(int, input().split())

ans = -1

for p in range(13, 1350):
    if int(p * 0.08) == A and int(p * 0.1) == B:
        ans = p
        break

print(ans)

Solution (Python):
import math
a,b=list(map(int,input().split()))
ans=-1
for i in range(1,1100):
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    ans=i
    break
print(ans)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
A,B=map(int,input().split())

s=-1
for i in range(10,1250):
    if A==int(0.08*i) and B==int(0.1*i):
        s=i
        break

print(s)

Solution (Python):
a, b = map(int, input().split())
for n in range(1,10**6):
  if (n*8)//100 == a and n//10 == b:print(n);exit()
print(-1)

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

for p in range(1000):
  if int((p + 1) * 0.08) == a and int((p + 1) * 0.1) == b:
    print(p + 1)
    break
  if p == 999:
    print('-1')

Solution (Python):
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


def main():
    a, b = list(map(int, input().split()))
    l = []
    for i in range(math.ceil(max(a/0.08, b/0.1)), math.ceil(min((a+1)/0.08, (b+1)/0.1))):
        l.append(i)
    if l:
        print(l[0])
    else:
        print(-1)


if __name__ == '__main__':
    main()

Solution (Python):
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)

Solution (Python):
A, B = map(int, input().split())

for p in range(13, 1250):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		exit()

print(-1)

Solution (Python):
a,b=map(int, input().split())
min = b*10
max = (b+1)*10
flag = True
for i in range (min, max):
  if a*100/8 <= i and i < (a+1)*100/8:
    print(i)
    flag = False
    break
    
if flag:
  print(-1)

Solution (Python):
A,B=map(int,input().split())
i=0
while i<1001:
    X=int(i*0.08)
    Y=int(i*0.10)
    if A==X and B==Y:
        break
    i=i+1
if i==1001:
    i=-1
    print(i)
else:
    print(i)

Solution (Python):
def tax_increase(a,b):
    t8  = 0.08
    t10 = 0.1
    for i in range(b*10,(b+1)*10,1):
        if int(i*t8) == a:
            return i
    return -1
    
if __name__ == '__main__':
    a,b = map(int,input().split())
    ans = int(tax_increase(a,b))
    print(ans)

Solution (Python):
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)

Solution (Python):
A,B=map(int,input().split())
i=0
while i<1001:
    X=int(i*0.08)
    Y=int(i*0.10)
    if A==X and B==Y:
        break
    i=i+1
if i==1001:
    i=-1
    print(i)
else:
    print(i)

Solution (Python):
import math
a,b=map(int,input().split())
ans=1
while ans>0 :
    a_ans=math.floor(ans*0.08)
    b_ans=math.floor(ans*0.1)
    if a_ans==a and b_ans==b:
        break
    elif a_ans>a or b_ans>b:
        ans=-1
        break
    else:
        ans+=1
print(ans)

Solution (Python):



st = input().split()

for i in range(1001):
  
  a = int(i * 0.08)
  b = int(i * 0.1)
  if(a == int(st[0]) and b == int(st[1])):
    print(i)
    break;
  elif(i == 1000):
    print('-1')

Solution (Python):
a,b = map(int,input().split())

ans = 13
while True:
    if int(ans*0.08)==a and int(ans*0.1)==b:
        print(ans)
        break
    else:
        ans += 1
        if ans > 1262:
            print(-1)
            break

Solution (Python):
a, b = map(int, input().split())
def cal():
    for i in range(1,1010):
        at=int(i*0.08)
        bt=int(i*0.1)
        if at == a and bt == b:
            return i
    return -1
print(cal())

Solution (Python):
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd



import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def main():
    a,b = map(int,input().strip().split())
    
    
    x=100*a//8
    while True:
        if 100*b <= 10*x < 100*(b+1) and 100*a <= 8*x < 100*(a+1):
            print(x)
            return
        if 10*x > 100*(b+1) and 8*x > 100*(a+1):
            print(-1)
            return
        x+=1
    
if __name__ == '__main__':
    main()