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 sys
import math

input = sys.stdin.readline

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

Moneys = range(1,1001)


a_index=set()
b_index=set()

for i in Moneys:
    if math.floor(i*0.08) == A:
        a_index.add(i)

for j in Moneys:
    if math.floor(j*0.1) == B:
        b_index.add(j)

Tax = a_index&b_index

if len(Tax)!=0:
    print(min(list(Tax)))
else:
    print(-1)

Solution (Python):
import math
a, b = map(int, input().split())
x = []
y = []
for i in range(math.ceil(b/0.1), math.floor((b+1)/0.1)):
    y.append(i)
for i in range(math.ceil(a/0.08), math.floor((a+1)/0.08)):
    x.append(i)
    if y.count(i) == 1:
        print(i)
        exit()
print('-1')

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

found = False
for i in range(1, 10000):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        found = True
        break

if not found:
    print(-1)

Solution (Python):
import sys

a,b = (int(n) for n in input().split())

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

print("-1")

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

from math import ceil

a1 = ceil(a / 0.08)
a2 = ceil((a+1) / 0.08)
b1 = ceil(b / 0.1)
b2 = ceil((b+1) / 0.1)

m = min([a1,b1])

if m == a1:
    if b1 in range(a1,a2):
        ans = b1
        print(ans)
    else:
        print('-1')

else:
    if a1 in range(b1,b2):
        ans = a1
        print(ans)
    else:
        print('-1')

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

Solution (Python):
import math

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

if math.ceil(A / 0.08) < math.ceil(B / 0.1):
  start_plice = math.ceil(A / 0.08)
  
  while True:
    if math.floor(start_plice * 0.08) > A:
      print(-1)
      break

    if math.floor(start_plice * 0.1) >= B:
      print(start_plice)
      break

    start_plice += 1
    
else:
  start_plice = math.ceil(B / 0.1)
  
  while True:
    if math.floor(start_plice * 0.1) > B:
      print(-1)
      break

    if math.floor(start_plice * 0.08) >= A:
      print(start_plice)
      break

    start_plice += 1

Solution (Python):
A, B = map(int, input().split())
import math
ans = -1
X = 1
while X <= 1000 :
    if (math.floor(X*0.08)==A) & (math.floor(X*0.1)==B) :
        ans = X
        break
    X += 1
    
print(ans)

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

c = int(b * 10)

for i in range(c-20, c+20):
    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())

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)

Solution (Python):
A, B = map(int, input().split())
 
 
def f(A, B):
    for i in range(1, 1010):
        if i//10 == B and (i*2)//25 == A:
            print(i)
            return
    print(-1)
    return
 
 
f(A, B)

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

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

ans = -1
for i in range(1251):
    atax = int(i*0.08)
    btax = int(i*0.1)
    if atax == a and btax == b:
        ans = 0
        break
if ans == 0:
    print(i)
else:
    print(ans)

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


def f(A, B):
    for i in range(1, 1010):
        if i//10 == B and (i*2)//25 == A:
            print(i)
            return
    print(-1)
    return


f(A, B)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    a, b = map(int, rl().split())
    for p in range(1, 10001):
        if int(p * 0.08) == a and int(p * 0.1) == b:
            print(p)
            exit()
    print(-1)


if __name__ == '__main__':
    solve()

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

for i in range(1100):
    if i * 0.08 // 1 == A and i * 0.1 // 1 == B:
        print(i)
        exit()

print(-1)

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

Solution (Python):
A,B=map(int,input().split())
if A%2==0:
  X=int(A/0.08)
else:
  X=int(A/0.08)+1
Y=int(B/0.10)
if (A+1)%2==0:
  P=int((A+1)/0.08)
else:
  P=int((A+1)/0.08)+1
Q=int((B+1)/0.10)
if X<Y:
  if Y<P:
    print(Y)
  else:
    print(-1)
else:
  if X<Q:
    print(X)
  else:
    print(-1)

Solution (Python):
import math
a, b = map(int, input().split())
ans = []
for i in range(1010): 
    p8 = math.floor(i * 0.08)
    p10 = math.floor(i * 0.1)
    if p8 == a and p10 == b:
        ans.append(i)

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

Solution (Python):
import math
a,b = map(int,input().split())
i = 0
ans = []
while i<=1000:
    i += 1
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        ans.append(i)
    if ans == []:
        ans.append(-1)


if len(ans)==1:
    print(-1)
else:
    ans.remove(-1)
    print(min(ans))

Solution (Python):
def main():
    import sys
    import math
    A,B=map(int,input().split())
    A1=math.ceil(A/0.08)
    A2=(A+1)//0.08
    for i in range(int(A1),int(A2)):
        if i//10==B:
            print(i)
            sys.exit()

    print(-1)    
if __name__ == '__main__':
    main()

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

Solution (Python):
from sys import stdin
import sys
import math

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








def tax(x,ratio):
    return math.floor(x * ratio / 100)


xA = int(A * 100 / 8)
xB = int(B * 100 / 10)

for i in range(max(0, xB-1), xA+10000):
    tax_a = tax(i, 8)
    tax_b = tax(i, 10)

    if tax_a == A and tax_b == B:
        print(i)
        sys.exit()

print(-1)

Solution (Python):
A,B = map(int,input().split(sep=" "))
i = 0
for i in range(0, 1251,1):
    if i*8//100 == A and i*10//100 == B:
        print(i)
        exit()
print(-1)

Solution (Python):
import math
a, b = map(int,input().split())
e = 10**-7
mi = max(math.ceil(a*12.5),b*10)
ma = min(int(math.ceil((a+1)*12.5)-1),(b+1)*10-1)
if mi > ma:
    print(-1)
else:
    print(mi)

Solution (Python):
import sys

A, B = list(map(int, input().split()))
for i in range(10101):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        sys.exit()
print(-1)

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

min_a=a*12.5
min_b=b*10

if min_b-min_a<12.5 and min_a<=min_b:
    print(str(min_b))

elif min_a-min_b<10 and min_b<=min_a:
    if a%2==1:
        print(str(int(min_a)+1))
    else:
        print(str(int(min_a)))
else:
    print(str(-1))

Solution (Python):

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

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


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

    if(result):

        break



if(result==False):
    print(-1)

Solution (Python):


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)

Solution (Python):
import math

A, B = map(int, input().split())
Am = math.ceil(A * 12.5)
AM = math.ceil((A+1) * 12.5)
Bm = B * 10
BM = (B+1) * 10

if AM <= Bm or BM <= Am:
  print(-1)
elif Am <= Bm:
  print(Bm)
else:
  print(Am)

Solution (Python):
A, B = map(int, input().split())
X=[]
for i in range(1100):
	if A+1>0.08*i>=A and B+1>0.1*i>=B:
		X.append(i)

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

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

for i in range(10*b,10*b+10):
	if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
		ans = i
		g += 1
		break
if g > 0:        
	print(ans)
else:
	print(-1)

Solution (Python):
import math
a, b = map(int, input().split())
c = set(range(math.ceil(a*100/8), math.ceil((a + 1)*100/8)))
d = set(range(math.ceil(b*10), math.ceil((b + 1)*10)))
if len(c & d) == 0:
  print(-1)
else:
  print(min(c & d))

Solution (Python):
a,b = map(int,input().split())
for i in range(1,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())
import math

x = set(range(math.ceil(a/0.08), math.floor((a+0.99)/0.08)+1))
y = set(range(math.ceil(b/0.1), math.floor((b+0.99)/0.1)+1))
z = x.intersection(y)
print(min(z)) if z else print(-1)

Solution (Python):
from math import floor, ceil
a, b = map(int, input().split())
x = max(ceil(a / 0.08), ceil(b / 0.1))
ans = -1
for y in range(x, 2000, 1):
    if a == floor(y * 0.08) and b == floor(y * 0.1):
        ans = y
        break
    elif a != floor(y * 0.08) and b != floor(y * 0.1):
        ans = -1
print(ans)

Solution (Python):
import math

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

i = 1
c = 1
d = 0
while i > 0:
  if d > B:
    print(-1)
    break
  else:
    a = math.floor(c * 0.08)
    b = math.floor(c * 0.1)
    if a == A and b == B:
      print(c)
      break
    else:
      c += 1
      d = b

Solution (Python):

import sys


def solve(A: int, B: int):
    for i, a, b in map(lambda x: (x, int(x*0.08), int(x*0.1)), range(A*100)):
        if a == A and b == B:
            return i
    return -1



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    print(solve(A, B))

if __name__ == '__main__':
    main()

Solution (Python):


def main():
    A, B = [int(i) for i in input().split()]
    A_o = int(A*100/8)
    B_o = B*10

    if A_o == B_o:
        print(B*10)
    elif A_o > B_o:
        for i in range(B_o,(B+1)*10):
            if int(i * 0.08) == A:
                print(i)
                return
        else:
            print(-1)
    elif A_o < B_o:
        for i in range(A_o,int((A+1)*100/8)):
            if (i * 0.1) == B:
                print(i)
                return
        else:
            print(-1)

if __name__ == "__main__":
    main()

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)
        exit()

print(-1)

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

for i in range(1500):
    if int(i*0.08) == A and int(i*0.1) == B:
        x = i
        break
print(x)

Solution (Python):
import math

a, b = map(int, input().split())
min_a = math.ceil(a / 0.08)
max_a = math.ceil((a+1) / 0.08)

max_b = math.ceil((b+1) / 0.1)
min_b = math.ceil(b / 0.1)

a_range = set(list(range(min_a, max_a)))
b_range = set(list(range(min_b, max_b)))
t = a_range & b_range
if len(t) > 0:
    print(min(list(t)))
else:
    print(-1)

Solution (Python):
import math
a,b = map(int, input().split())
ans = [[] for _ in range(2)]
p1_min = math.ceil(a*100/8)
p1_max = math.ceil((a+1)*100/8)
for i in range(p1_min,p1_max):
    ans[0].append(i)
    
p2_min = math.ceil(b*100/10)
p2_max = math.ceil((b+1)*100/10)
for i in range(p2_min,p2_max):
    ans[1].append(i)

if (ans[0][0] >= ans[1][0]):
    if (ans[1][-1] >= ans[0][0]):
        print(ans[0][0])
    else:
        print(-1)
else:
    if (ans[0][-1] >= ans[1][0]):
        print(ans[1][0])
    else:
        print(-1)

Solution (Python):
import math

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

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

    x += 1

print(-1)

Solution (Python):
from math import floor
import sys
from copy import copy
input = sys.stdin.readline
'''
n, m = map(int, input().split())
n = int(input())
A = list(map(int, input().split()))
S = input().strip()
for test in range(int(input())):
'''
inf = 100000000000000000  
mod = 998244353

aa, bb = map(int, input().split())
for i in range(1, 10000):
    if int(floor(i * 0.08)) == aa and int(floor(i * 0.1)) == bb:
        print(i)
        sys.exit()
print("-1")

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

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

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

x = -1
for i in range(10100):
  if (int(i*0.08) == A) and (int(i*0.1) == B):
    x = i
    break
  
print(x)

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

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

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

ans = -1 

for price in range(10000):
    tax_a = int(price * 0.08)
    tax_b = int(price * 0.1)
    if tax_a == a and tax_b == b:
        ans = price
        break

print(ans)

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

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

print(ans)

Solution (Python):
import math

a,b = list(map(int,input().split()))
output = '-1'

c = math.ceil(a/0.08)
d = math.ceil(b/0.1)
c_plus = math.ceil((a+1)/0.08)
d_plus = math.ceil((b+1)/0.1)

if c_plus <= d or d_plus <= c:
  print(output)
else:
  print(max(c,d))

Solution (Python):
import sys
import math
input = sys.stdin.readline
input = sys.stdin.buffer.readline

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))


def main():
    A, B = MI()
    x = 10*B
    n = 0

    for i in range(1001):
        if  math.floor(x*0.08) == A:
            break
        x += 1

        if i == 1000:
            x = 10*B
            break
    for i in range(1001):
        x += -1
        if math.floor(x*0.08) != A or math.floor(x*0.1) != B:
            x += 1
            break

    if math.floor(x*0.08) == A and math.floor(x*0.1) == B:
        print(x)
    else:
        print(-1)





if __name__ == "__main__":
	main()

Solution (Python):
import sys
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

A, B = rl()

import math
for i in range(1, 2000):
    if math.floor(i*8/100) == A and math.floor(i*10/100) == B:
        print(i)
        exit()
print(-1)

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

a_min = -(-a*100//8)
a_max = int((a+1)*100/8)-1
b_min = -(-b*100//10)
b_max = int((b+1)*100/10)-1

if a_max >= b_min and b_max >= a_min:
    print(max([a_min, b_min]))
else:
    print(-1)

Solution (Python):
import math
def main():
    A, B = map(int, input().split())
    find = False
    price = 0
    for i in range(1, 10001):
        if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
            price = i
            find = True
            break
    if find:
        print(i)
    else:
        print(-1)
if __name__ == "__main__":
    main()

Solution (Python):
a, b = map(int, input().split())
x_min = int(b * 10)
x_max = x_min + 9
ok_flag = False

for x in range(x_min, x_max + 1):
    ax = int(x * 0.08)
    if ax == a:
        ok_flag = True
        break

result = x if ok_flag else '-1'
print(result)

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

for i in range(1, 1001):
    if int(i * 0.08) == A and int(i * 0.10) == B:
        print(i)
        sys.exit(0)
print(-1)

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

ans = -1
for i in range(1,1010):
    if i*8//100 == A and i*10//100 == B:
        ans = i
        break

print(ans)

Solution (Python):
import math

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

for i in range(1001):
    temp_a = i * 0.08
    temp_b = i * 0.1
    if math.floor(temp_a) == a and math.floor(temp_b) == b:
        print(i)
        exit(0)
print("-1")

Solution (Python):
a,b=map(int,input().split())
ans=-1
for i in range(1,1001):
    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())

min_a = math.ceil(a/0.08)
max_a = math.floor((a+1)/0.08)
min_b = math.ceil(b/0.1)
max_b = math.floor((b+1)/0.1)

if max_a <= min_b or max_b <= min_a:
  print(-1)
else:
  print(max([min_a, min_b]))

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

Solution (Python):
import math
flag = 0
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
    elif i*0.08 > a and i*0.1 > b:
        print(-1)
        break

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

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

print(ans)

Solution (Python):
import math
a, b = list(map(int,input().split()))
i = 0
j = 0
res = 0
while i < a or j < b:
	i = math.floor(res * 0.08)
	j = math.floor(res * 0.1)
	
	
	
	
	if i == a and j == b:
		break
	res += 1

if i > a or j > b:
	print(-1)
else:
	print(res)

Solution (Python):

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
    elif i*0.08 > a and i*0.1 > b:
        print('-1')
        break

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

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

Solution (Python):
A, B = map(int, input().split())
X = -1
start = 1
end = 10000
for i in range(start, end):
    if int(i * 0.1) == B and int(i * 0.08) == A:
        X = i
        break

print(X)

Solution (Python):
A,B=map(int,input().split())
X=A/0.08
Y=B/0.1
Z=max(X,Y)
if not int(Z*0.08) == A:
	Z=-1
if not int(Z*0.1) == B:
	Z=-1
if int(Z) == Z:
	print(int(Z))
else:
	print(int(Z)+1)

Solution (Python):
A,B=[int(s) for s in input().split()]
for i in range(1,1001):
  a=int(i*0.08)
  b=int(i*0.1)
  if a==A and b==B:
    print(i)
    break
else:
  print(-1)

Solution (Python):

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


candidate_prices = [(B * 10) + i for i in range(0, 9)]


min_price = -1
for p in candidate_prices:
    if int(p * (0.08)) == A:
        min_price = p
        break

print(min_price)

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

for i in range(1, 2000):
    price_a = 0.08 * i
    price_b = 0.1 * i

    if int(price_a) == a and int(price_b) == b:
        print(i)
        exit()
print(-1)

Solution (Python):
import math
A,B=map(int, input().split())
flag=False
for i in range(1250):
  A_X=math.floor(i*0.08)
  if(A_X==A):
    B_X=math.floor(i*0.10)
    if(B_X==B):
      print(i)
      flag=True
      break
if(flag==False):
  print(-1)

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

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

for i in range(int(min(A/0.08, B/0.1)), int(max((A+1)/0.08,(B+1)/0.1))):
    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())

x1 = a / 0.08
x2 = b / 0.10

for x in range(int(min(x1, x2))-10, int(max(x1, x2))+10):
    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())

for x in range(2000):
    if int(x*0.08) == a and int(x*0.10) == b:
        print(x)
        exit()
print(-1)

Solution (Python):
import math

a, b = map(int, input().split())
minV = math.ceil(a / 0.08)
maxV = int((a + 1) // 0.08)

for i in range(minV, maxV):
    if int(i * 0.1) == b:
        print(i)
        exit()
print(-1)

Solution (Python):
a,b=map(int, input().split())
if (100*a)%8==0:
    min8=int(a/0.08)
else:
    min8=int((a/0.08)+1)
if (100*(a+1))%8==0:
    max8=int((a+1)/0.08)-1
else:
    max8=int((a+1)/0.08)
min10=int(b/0.1)
max10=int((b+1)/0.1)-1

for i in range(min8,max8+1):
    if min10<=i<=max10:
        print(i)
        exit()
print("-1")

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

for i in range(int(b/0.1), int((b+1)/0.1)):
    if int(i*0.08) == a:
        print(i)
        break
else:
    print(-1)

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

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

n = min(int(a / 0.08), int(b / 0.1))

def lookup():    
    for i in range(n, 10000):
        tax_a = int(i * 0.08)
        tax_b = int(i * 0.1)
        if tax_a == a and tax_b == b:
            print(i)
            return
    print(-1)

lookup()

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

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

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

Solution (Python):
import sys
import math
a,b=map(int,input().split())
C = [i for i in range(12,1001)]
for c in C:
  if math.floor(c * 0.08) == a and math.floor(c * 0.1)==b:
    print(c)
    sys.exit()

print(-1)

Solution (Python):
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 Amax<=Bmin or Bmax<=Amin:
    print(-1)
else:
  a=math.ceil(Amin)
  b=math.ceil(Bmin)
  if a<Bmax or b<Amax:
    print(max(a,b))
  else:
    print(-1)

Solution (Python):
import math

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

priceA1 = math.ceil(A / 0.08)
priceA2 = (A+1) / 0.08
priceB1 = math.ceil(B / 0.10)
priceB2 = (B+1) / 0.10

if math.floor(priceA2) < priceA2:
    priceA2 = math.floor(priceA2)
else:
    priceA2 = math.floor(priceA2) - 1


if math.floor(priceB2) < priceB2:
    priceB2 = math.floor(priceB2)
else:
    priceB2 = math.floor(priceB2) - 1

if priceA1 <= priceB1 <= priceA2:
    print(math.ceil(priceB1))
elif math.ceil(priceB1) < math.ceil(priceA1) < priceB2:
    print(math.ceil(priceA1))
elif math.ceil(priceA1) == math.ceil(priceB1):
    print(math.ceil(priceA1))
else:
    print(-1)

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

Solution (Python):
from sys import stdin
import math

if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    A, B = list(map(int,_in[0].split(' ')))  
    
    if B/0.1<A/0.08:
        cnt = -1 if (B+1)/0.1<=A/0.08 else math.ceil(A/0.08)
    else:
        cnt = -1 if (A+1)/0.08<=B/0.1 else math.ceil(B/0.1)
    
    print(cnt)

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

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

print(result)

Solution (Python):
import sys

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

def main():
    res = -1
    for i in range(1, 2000):
        if i * 8 // 100 == a and i // 10 == b:
            res = i
            break
    print(res)

if __name__ ==  '__main__':
    main()

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

for i in range(b*10,(b+1)*10+1,1):
    if i == (b+1)*10:
        print(-1)
        break
    elif a*12.5 <= i and i < (a+1)*12.5:
        print(i)
        break

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

for bb in range(b*10,(b+1)*10+1,1):
  if bb == (b+1)*10:
    print(-1)
    break
  elif a*12.5 <= bb and bb < (a+1)*12.5:
    print(bb)
    break

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

if b[0]%2==0:
  for i in range(13):
    taxa = int(b[0]*12.5+i)
    for j in range(10):
      taxb = b[1]*10+j
      if taxa == taxb:
        break
    if taxa == taxb:
        break
else:
  for i in range(12):
    taxa = int(b[0]*12.5)+i+1
    for j in range(10):
      taxb = b[1]*10+j
      if taxa == taxb:
        break
    if taxa == taxb:
        break
if taxa == taxb:        
  print(taxa)
else :
  print("-1")

Solution (Python):
a,b=map(int,input().split())
cand_b=[b*10 + i for i in range(10*b)]
def ans(cand):
  for price in cand:
    if int(price*0.08)==a and int(price*0.1)==b:
      print(price)
      return
  print(-1)

ans(cand_b)

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

start = b * 10
flg = True
for i in range(10):
  tmp = start + i
  if int(tmp*0.08) == a:
    flg = False
    break
if flg:
  print('-1')
else:
  print(int(tmp))

Solution (Python):
a,b=map(int,input().split())
 
x=(a*100)//8
x=x-10

flag=0
for i in range(1,1009):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    flag=1
    break

if flag==0:
  print(-1)

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

Solution (Python):
A,B =  map(int,input().split())
def tax(A,B):
    for i in range(1,1252):
        if int(0.08*i)==A and int(0.1*i)==B:
            return i
        elif i==1251:
            return -1
print(tax(A,B))

Solution (Python):

url = "https://atcoder.jp//contests/abc158/tasks/abc158_c"

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

if __name__ == '__main__':
    main()

Solution (Python):
import math
A,B=map(int,input().split())
nuki=[]
for i in range(1001):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
        nuki+=[i]

print(min(nuki) if len(nuki)!=0 else -1)

Solution (Python):
A, B = map(int, input().split())
ans = 0
minprice = 1010
for i in range(1, 1010): 
    if int(i*0.08)==A and int(i*0.10)==B:
        minprice = min(minprice,i)
        ans = 1
print(minprice if ans == 1 else -1)

Solution (Python):
a,b = map(int,input().split(' '))
imin, imax = b*10, b*10+10
i = imin
while i < imax:
    if int(i*0.08) == a:
        print(i)
        break
    i += 1
if i == imax:
    print('-1')

Solution (Python):


import sys
import math


















def main():
    mod = 1000000007                  
    inf = float('inf')
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    a, b = mi()
    a_s = math.ceil(a * 100 / 8)
    a_t = (a+1) * 100 / 8
    if a_t % 1 == 0:
        a_t = int(a_t) - 1
    else:
        a_t = int(a_t)
    for i in range(a_s, a_t + 1):
        if b * 10 <= i < (b+1) * 10:
            print(i)
            exit()
    print(-1)



if __name__ == "__main__":
    main()

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

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

Solution (Python):
import math
A, B = list(map(int, input().split()))
a = math.ceil(A/0.08)
b = math.ceil(B/0.1)

if a > b:
    a, b = b, a

for i in range(a, b+1):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        print(i)
        exit()

print(-1)

Solution (Python):










mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    a,b = readInts()
    for i in range(1,1001):
        a_ = int(i * 0.08)
        b_ = int(i * 0.1)
        if a_ == a and b_ == b:
            print(i)
            exit()
    print(-1)
if __name__ == '__main__':
  main()

Solution (Python):

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

def lr(A, tax):
    if (100 * A) % tax == 0:
        x1_l = 100 * A // tax
    else:
        x1_l = 100 * A // tax + 1
    if (100 * A + 100) % tax == 0:
        x1_r = (100 * A + 100) // tax - 1
    else:
        x1_r = (100 * A + 100) // tax
    return list(range(x1_l, x1_r+1))

list8=lr(A,8)
list10=lr(B,10)
ret = []
for val in list8:
    if val in list10:
        ret.append(val)
if len(ret)==0:
    print(-1)
else:
    print(min(ret))