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):
A, B = map(int, input().split())
for i in range(1, 10**4 + 100):
  if int(i * 0.08) == A and int(i * 0.1) == B:
    print(i)
    exit()
    
print('-1')

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

for i in range(1001):
    if a==int(i*1.08)-i and b==int(i*1.10)-i:
        print(i)
        break
else:
    print(-1)

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

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

answered=False
ans = 0 
for i in range(1,1500):
    if int(0.08*i)==a and int(0.10*i)==b:
        answered=True
        print(i)
        break
    else:
        continue    

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

Solution (Python):
def solve():
    A, B = map(int, input().split())
    for price in range(10000):
        eight = price * 0.08
        ten = price * 0.10
        if int(eight) == A and int(ten) == B:
            print(price)
            break
    else:
        print('-1')

if __name__ == '__main__':
    solve()

Solution (Python):
a,b=map(int,input().split())
tmp_min=min(-(-(a*100)//8),b*10)
tmp_max=max(-(-(a*100)//8),b*10)
ans="-1"
for i in range(tmp_max-tmp_min+1):
    tmp=tmp_min+i
    if tmp*0.08//1==a and tmp*0.1//1==b:
        ans=tmp
        break
    if tmp*0.08//1>a or tmp*0.1//1>b:
        break
print(ans)

Solution (Python):
import math

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

for i in range(10 * B, 10 * (B + 1)):
    if A == math.floor(0.08 * i):
        print(i)
        exit(0)

print(-1)

Solution (Python):
"""
// Author : snape_here - Susanta Mukherjee
     
"""
 
from __future__ import division, print_function
 
import os,sys
from io import BytesIO, IOBase
 
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
 
 
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())
 
 
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x
    
 
def read():
    sys.stdin = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 
 
 
import math

mod=1000000007 

def main():

    a,b=mi()
    x=int(math.ceil(a/(0.08)))
    y=int(math.ceil(b/(0.1)))
    
    if x>y:
        if int(x*0.1)==b:
            print(x)
        else:
            print(-1)
    else:
        if int(y*0.08)==a:
            print(y)
        else:
            print(-1)


 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
 
 
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
 
input = lambda: sys.stdin.readline().rstrip("\r\n")
 

 
 
if __name__ == "__main__":
    
    main()

Solution (Python):
import math
A,B = map(int,input().split())
r_a = []
r_a_l = math.ceil((A * 100) / 8)
r_a_r = ((A + 1) * 100) // 8
r_b_l = math.ceil((B * 100) // 10)
r_b_r = ((B + 1) * 100) // 10

ans = -1
for i in range(r_a_l,r_a_r,1):
    for j in range(r_b_l,r_b_r,1):
        if i == j and ans == -1:
            ans = i
        else:
            pass
print(ans)

Solution (Python):
A,B = map(int,input().split())
ran = B*10
for i in range(ran,ran+10):
    if int(i * 0.08) == A:
        print(i)
        break
else:
    print(-1)

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

Solution (Python):
A, B = map(int, input().split())
ans = []
for i in range(2000, 0, -1):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        ans.append(i)

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

Solution (Python):
from math import floor as fl

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

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

print(ans)

Solution (Python):
import math

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

A_min = math.ceil(A * 12.5)
A_max = math.ceil((A + 1) * 12.5) - 1

B_min = math.ceil(B * 10)
B_max = math.ceil((B + 1) * 10) - 1

candidate = max(A_min, B_min)
if candidate < min(A_max, B_max):
    print(candidate)
else:
    print('-1')

Solution (Python):

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:
        result = i
        break
else:
    result = -1
    
print(result)

Solution (Python):
A,B = map(int,input().split())
n = min(A//0.08,B//0.1)-1
flag = False
while n*0.1<B+1 and n*0.08<A+1:
    if n*0.08//1 == A and n*0.1//1 == B:
        flag = True
        break
    else:
        n += 1

if flag:
    print(int(n))
else:
    print("-1")

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

a1 = math.ceil( A /0.08 )
a2 = math.ceil( (A+1) /0.08 )-1

b1 = math.ceil( B /0.1 )
b2 = math.ceil( (B+1) /0.1 )-1

ans = max(a1,b1)
if ans >= a1 and ans <= a2 and ans >= b1 and ans <= b2:
  print(ans)
else:
  print(-1)

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

Solution (Python):
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


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

    ans = 2000
    for i in range(1, 1001):
        if a == math.floor((i * 1.08)) - i and b == math.floor((i * 1.10)) - i:
            ans = min(ans, i)
    if ans == 2000:
        print('-1')
    else:
        print(ans)


main()

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

x = 0
while True:
    if(int(x * 0.08) == a and int(x*0.1) == b):
        print(x)
        break
    elif x == 1001:
        print(-1)
        break
    x+=1

Solution (Python):

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

min_X_A = int(A // 0.08 + (1 if A % 0.08 > 0 else 0))
max_X_A = int((A + 1) // 0.08)
min_X_B = int(B // 0.1 + (1 if B % 0.1 > 0 else 0))
max_X_B = int((B + 1) // 0.1)

if max_X_A < min_X_B or max_X_B < min_X_A:
    print(-1)
else:
    print(max(min_X_A, min_X_B))

Solution (Python):
eight, ten = map(int, input().split(" "))

for i in range(10, 10001):
    if int(i * 0.08) == eight and int(i * 0.1) == ten:
        print(i)
        break
else:
    print(-1)

Solution (Python):
A, B = map(int, input().split())
a = [i for i in range(1, 1001) if int(i * 0.08) == A]
b = [i for i in range(1, 1001) if int(i * 0.1) == B]
c = set(a) & set(b)
if len(c):
    print(min(c))
else:
    print(-1)

Solution (Python):
import math

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

for i in range(1101):
    ans = i
    if i == 1100:
        print('-1')
        break
    elif math.floor(ans * 0.08) == A and math.floor(ans * 0.1) == B:
        print(i)
        break
    else:
        continue

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

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

ans = -1
for X in range(1300):
    tmp_A = int(X*0.08)
    tmp_B = int(X*0.10)
    if A == tmp_A and B == tmp_B:
        ans = X
        break
print(ans)

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

Solution (Python):
import math
A, B = [int(x) for x in input().split()]

xa = math.ceil(A / 0.08)
xb = math.ceil(B / 0.1)

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

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

eightper = []
n = int(a/0.08)
if int(n*0.08) == a:
    pass
elif int(n*0.08) == a - 1:
    n += 1
else:
    n -= 1

while int(n*0.08) == a:
    eightper.append(n)
    n += 1
    
for e in eightper:
    if int(e*0.1) == b:
        print(e)
        break
else:
    print(-1)

Solution (Python):
def main():
  a, b = input_list()
  ans = []
  for i in range(1, 1001):
    ai = i * 0.08
    bi = i * 0.1
    if int(ai) == a and int(bi) == b:
      ans.append(i)
  if len(ans) == 0:
    print(-1)
  else:
    print(min(ans))
    
def input_list():
  return map(int, input().split())

def input_list_str():
  return map(str, input().split())

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

import math
import fractions
from functools import reduce
main()

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

Solution (Python):
a,b=map(int,input().split())
ans=0
for i in range(1,1000000000000):
    cnt=0
    if int(i*0.08) > 100:
        break
    if int(i*0.08) == a:
        if int(i*0.1) == b:
            cnt+=1
    if cnt == 1:
        print(i)
        ans+=1
        break

if ans==0:
    print(-1)

Solution (Python):
import math
A, B = map(int, input().split())
a = A * 25 / 2
b = B * 10
if math.ceil(a) >= b+10 or a + 12.5 <= math.ceil(b):
    print(-1)
else:
    print(math.ceil(max(a, b)))

Solution (Python):
A,B=map(int,input().split())
a=(A+1)/(0.08)
b=A/(0.08)
c=(B+1)*10
d=B*10
for i in range(d,c):
  if b<=i and i<a:
    print(i)
    exit()
print(-1)

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

ans = -1
for i in range(1,1500):
    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())

tax1 = int(a/0.08)
tax2 = int(b/0.1)
en = 0
l = sorted([tax1,tax2])
for i in range(l[0]-1,l[1]+2):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        en = 1
        break
if en == 0:
    print(-1)

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):
import sys
input = sys.stdin.readline
A, B = map(int, input().split())

xmin = 1
while xmin :
    if int(0.08*xmin) == A and int(0.1*xmin) == B :
        print(int(xmin))
        exit()
    elif int(0.08*xmin) < A or int(0.1*xmin) < B :
        xmin += 1
    else :
        print(-1)
        exit()

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

Solution (Python):
import math

A, B = map(int, input().split())
ans = 0
while ans < 1001:
    if math.floor(ans * 0.08) == A and math.floor(ans * 0.1) == B:
        print(ans)
        break
    ans += 1
else:
    print(-1)

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

Solution (Python):

import sys


def solve(A: int, B: int):
    for i in range(10):
        n = 10 * (B + i * 0.1)
        if 0 <= n * 0.08 - A < 1:
            print(int(n))
            return
    else:
        print(-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))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
import math
a,b = map(int,input().split())
x = math.ceil(a/0.08)
i,flag = 0,0
while(flag==0):
  if math.floor((x+i)*0.08) != a:
    flag = 1
    k = i
  else:
    i+=1
for j in range(k):
  if math.floor((x+j)*0.1) == b:
    print(x+j)
    exit()
print(-1)

Solution (Python):
import math

A, B = map(int, input().split())
flag = 0
for i in range(1, 2000):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        flag = 1
        break
if not flag:
    print(-1)

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

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

Solution (Python):
def solve():
    a, b = [int(i) for i in input().split()]

    for i in range(10**6):
        if int(i * 0.08) == a and int(i * 0.10) == b:
            print(i)
            return
    print(-1)
    return


if __name__ == "__main__":
    solve()

Solution (Python):
a,b = map(int,input().split())
flag = False
c = 0
for i in range(1,1251):
    x = int(i*0.08)
    y = int(i*0.1)
    if x == a and y == b:
        flag = True
        c = i
        break
if flag == False:
    print("-1")
else:
    print(c)

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

ret = -1
for i in range(15000):
  x = math.floor(i * 0.08)
  if x > a:
    break
  y = math.floor(i * 0.1)
  if y > b:
    break
  if x == a and y == b:
    ret = i
    break
print(ret)

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

ans = -1
for i in range(1000000):
    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())

S=max(12.5*A,10*B)

if S%1!=0:
    S=S//1+1

if S<12.5*A+12.5 and S<10*B+10:
    print(int(S))
else:
    print("-1")

Solution (Python):
A,B = map(int,input().split())
x = -1
for i in range(1,20000):
    if int(i*1.08)-i==A and int(i*1.1)-i==B:
        x = i
        break
print(x)

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

ans = -1
for i in range(1000000):
    if math.floor(i * 0.08) == A and math.floor(i*0.1) == B:
        ans = i
        break

print(ans)

Solution (Python):
import sys

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

b_candidate = b * 10

for i in range(10):
    if (b_candidate + i) * 8 // 100 == a:
        print(b_candidate + i)
        sys.exit()

print(-1)

Solution (Python):
import math

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

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

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

Solution (Python):

import sys


def solve(A: int, B: int):
    ans = -1
    for i in range(1, 1000000):
        tax_A = int(i * 108 / 100 - i)
        tax_B = int(i * 110 / 100 - i)
        if tax_A == A and tax_B == B:
            ans = i
            break
        else:
            continue
    print(ans)
    return



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))  
    solve(A, B)

if __name__ == '__main__':
    main()

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


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)

Solution (Python):
import math

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

ans = float('inf')
check = False
for i in range(1251):
    i = float(i)
    A = i * 0.08
    B = i * 0.1

    if math.floor(A) == a and math.floor(B) == b:
        ans = min(ans, i)
        check = True

if check:
    print(int(ans))
else:
    print(-1)

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

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

for i in range(1,100000):
    if A == math.floor(i*0.08) and B == math.floor(i*0.1):
        print(i)
        break
    if math.floor(i*0.08) > A and math.floor(i*0.1) > B:
        print('-1')
        break

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

if A % 2 == 0:
    Acan = set(list(range((100 * A) // 8, (100 * (A+1)) // 8)))
else:
    Acan = set(list(range((100 * A) // 8 + 1, (100 * (A+1)) // 8)))
Bcan = set(list(range(10 * B, 10 * (B+1))))

can = Acan & Bcan
if len(can) == 0:
    print(-1)
else:
    print(min(list(can)))

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

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

for i in range(1500):
    if int(i * 0.08 // 1) == A and int(i * 0.10 // 1) == B:
        print(i)
        sys.exit()

print("-1")

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

Solution (Python):
from math import floor

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

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

print(-1)

Solution (Python):
A,B = map(int, input().split())
flag = True
for i in range(11000):
    a = int(i*0.08)
    b = int(i*0.1)
    if a == A and b == B:
        print(i)
        flag = False
        break
if flag == True:
    print('-1')

Solution (Python):
A, B = map(int, input().split())
import math
pin = 0
for i in range(1,1010):
  if math.floor(i*0.08) == A and math.floor(i*0.10) == B:
    print(i)
    pin = 1
    break
if pin == 0:
  print(-1)

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B = map(int, input().split())

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


main()

Solution (Python):
A, B = list(map(int, input().split()))
a = []
b = []
ans = []
for i in range(1,1300):
  if(i*8//100 == A):
    a.append(i)
for i in range(1,1100):
  if(i*10//100 == B):
    b.append(i)
for i in range(len(a)):
  for j in range(len(b)):
    if(a[i] == b[j]):
      ans.append(b[j])
if(len(ans)==0):
  print(-1)
else:
  print(min(ans))

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

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

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

for yen in range(b * 10, b * 10 + 10):
  if yen * 8 // 100 == a:
    ans = yen
    break

print(ans)

Solution (Python):
import math
import sys
def input():
    return sys.stdin.readline()[:-1]

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

if __name__ == "__main__":
    main()

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

Solution (Python):
import math
a,b=map(int,input().split())
amin=math.ceil(a/0.08)
amax=(a+1)/0.08
if amax==float(int(amax)):
  amax=int(amax-1)
else:
  amax=math.floor(amax)
bmin=math.ceil(b/0.1)
bmax=(b+1)/0.1
if bmax==float(int(bmax)):
  bmax=int(bmax-1)
else:
  bmax=math.floor(bmax)
  
if bmax<amin or amax<bmin:
  print(-1)
else:
  if amin<bmin:
    print(bmin)
  else:
    print(amin)

Solution (Python):
from sys import stdin, exit

a, b = (int(x) for x in stdin.readline().rstrip().split())

i = 1
while i <= 1000:
    if (int(i * 0.08) == a) and (int(i * 0.1) == b):
        print(i)
        exit()
    else:
        i += 1
print(-1)

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


out = int(math.ceil(max(12.5*a, 10*b)))

max_lim = min(12.5*(a+1), 10*(b+1))
if out < max_lim:
    pass
else:
    out = -1
print(out)

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


c=a/0.08
if c==c//1:
    c=int(c)
else:
    c=int(c)+1
d=(a+1)/0.08
if d==d//1:
    d=int(d)
else:
    d=int(d)+1
x=set([i for i in range(c,d)])

e=int(b/0.1)
f=int((b+1)/0.1)
y=set([i for i in range(e,f)])

l=x&y

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

Solution (Python):
def solve(a,b):
	start,end= int(a/0.08),int((a+1)/0.08)
	for i in range(start,end):
		if int(i*0.10)==b:
			if int(i*0.08)==a:
				return i
	return -1
a,b= map(int,input().split(' '))
print(solve(a,b))

Solution (Python):
A, B = [int(i) for i in input().strip().split(" ")]

base = B * 10
while True:
  price8p = base * 8 // 100
  if price8p == A:
    print(base)
    break
  elif price8p > A:
    print(-1)
    break
  base += 1
  if base // 10 != B:
      print(-1)
      break

Solution (Python):
A, B = map(int, input().split(' '))
for x in range(1, 1251):
    if int(x * 0.08) == A and int(x * 0.10) == B:
        print(x)
        break
if x >= 1250:
    print(-1)

Solution (Python):
def main():
  a,b=map(int, input().split())
  for i in range(1251):
    if int(i*0.08)==a and int(i*0.1)==b:
      return i
  return -1
  
if __name__ == '__main__':
  print(main())

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

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

import math


Alist = []
Blist = []


for i in range(2000):
    taxA = i*0.08
    taxA = math.floor(taxA)
    if taxA == A:
        
        Alist.append(i)



for i in range(2000):
    taxB = i*0.10
    taxB = math.floor(taxB)
    if taxB == B:
        Blist.append(i)



Aset = set(Alist)
Bset = set(Blist)
Res = Aset.intersection(Bset)
if not Res:
    print(-1)
    exit()
ans = sorted(Res)[0]
print(ans)

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

ans = -1

x = b * 10

while math.floor(x * 0.1) == b:
    if math.floor(x * 0.08) == a:
        ans = x
        break
    x += 1
    
print(ans)

Solution (Python):
import math

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

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

print(ans)

Solution (Python):



from math import *
from copy import *
from string import *				
from random import *				
from sys import stdin
from sys import maxsize
from operator import *				
from itertools import *
from collections import Counter		
from collections import defaultdict 

'''

'''

def solve(l):
	n = len(l)
	

A,B = list(map(int, stdin.readline().rstrip().split()))
curr = 1
f = 1
while(curr < 100000):
	if(floor(curr*0.08) == A and floor(curr*0.1) == B):
		f = 0
		print(curr)
		break
	curr += 1
	

if(f):
	print(-1)

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

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

Solution (Python):
from collections import defaultdict
import math
A,B = map(int,input().split())
A_upper = (A + 1) / 0.08
A_bottom= (A ) / 0.08
A_upper = math.ceil(A_upper)
A_bottom= math.ceil(A_bottom)


B_upper = (B + 1) / 0.1
B_upper  = math.ceil(B_upper )
B_bottom= (B ) / 0.1
B_bottom= math.ceil(B_bottom )
Bs = list(range(B_bottom,B_upper ,1))
Bs = set(Bs)
ans = -1
for a in range(A_bottom,math.ceil(A_upper),1):
    if a in Bs:
        ans = a
        break
print(ans)

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

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

for ans in range(1, 1250 + 1):
    if int(ans * 0.08) == a and int(ans * 0.1) == b:
        print(ans)
        exit()
print(-1)

Solution (Python):

import math

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

rst = -1
for i in range(1, 1001):
    if math.floor(i * .08) == a and math.floor(i*.1) == b:
        rst = i
        break

print(rst)

Solution (Python):




import sys
input = sys.stdin.readline



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

Solution (Python):
from sys import stdin
import sys
A,B = map(int, stdin.readline().rstrip().split())
sys.setrecursionlimit(2000)
def search(x):
    p = (x*0.08)//1
    q = (x*0.10)//1
    if p==A and q==B:
        print(x)
        exit()
    elif p > A and q > B:
        print(-1)
    else:
        search(x+1)

search(1)

Solution (Python):
A,B = [int(i) for i in input().split()]
flag = False
for i in range(10000):
    if i * 8 // 100 == A and i // 10 == B:
        ans = i
        flag = True
        break
if flag:
    print(ans)
else:
    print(-1)

Solution (Python):
A, B = map(int, input().split())
flag = False
for i in range(int(min(A, B)//0.08)-1000,int(max(A,B)//0.1)+1000):
    if int(i*0.08) == A and int(i*0.1) == B:
        flag = True
        ans = i
        break
if flag == True:
    print(ans)
else:
    print(-1)

Solution (Python):
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial
from bisect import bisect_left 

enu = enumerate

sys.setrecursionlimit(10**7)
A, B = map(int, input().split())

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

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

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

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

ans = 10**9
for i in range(1, 100000):
    a = floor(i * 0.08)
    b = floor(i * 0.1)

    if a == A and b == B:
        ans = min(ans, i)

if ans == 10**9:
    print(-1)
else:
    print(ans)

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

for i in range(10*b,10*(b+1)):
	if i * 2 // 25 == a:
		print(i)
		exit()
print(-1)

Solution (Python):
import math


if __name__ == '__main__':
    a, b = list(map(int, input().split(" ")))
    for i in range(1, 1500):
        
        if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
            print(i)
            exit()
    print(-1)

Solution (Python):
a, b = map(int, open(0).read().split())

for i in range(b*10, b*10+10):
    if int(i * .08) == a:
        print(i)
        exit()
print(-1)

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

ans = -1
for i in range(0,1001):
    if(math.floor(i*0.08) == A and math.floor(i*0.10) == B):
        ans = i
        break
print(ans)

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

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

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

ans = -1
for i in range(1, 100000):
    h = floor(i * 0.08)
    z = floor(i * 0.1)
    if h == a and b == z:
        ans = i
        break
print(ans)