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 = [int(_) for _ in input().split()]
aa = [int(i * 0.08) for i in range(1, 10000)]
bb = [int(i * 0.1) for i in range(1, 10000)]
for i, a, b in zip(range(1, 10000), aa, bb):
    if (a, b) == (A, B):
        print(i)
        exit()
print(-1)

Solution (Python):
a,b=map(int,input().split())
a1=a/0.08
a2=(a+1)/0.08
b1=b/0.1
b2=(b+1)/0.1
ans=20000
for i in range(1,10001):
    if a1<=i and b1<=i and a2>i and b2>i:
        ans=min(ans,i)
if ans==20000:
    print(-1)
else:
    print(ans)

Solution (Python):
A, B = map(int, input().split())
a_0 = int((25 * A + 1) / 2)
a_1 = int((25 * (A + 1) - 1) / 2)
b_0 = int(10 * B)
b_1 = int(10 * (B + 1) - 1)
if a_0 >= b_0 and a_0 <= b_1:
    print(a_0)
elif b_0 >= a_0 and b_0 <= a_1:
    print(b_0)
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:
        print(i)
        break
else:
    print(-1)

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

Solution (Python):
import sys
import itertools

import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


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

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

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


ga = math.ceil(A/0.08)
gb = math.ceil(B/0.1)

small = min(ga,gb)
big = max(ga,gb)

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

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

Solution (Python):
from math import ceil as c,floor as f
a,b=map(int,input().split())
ah,bh=a+.99,b+.99
a1,a2=c(a/.08),f(ah/.08)
b1,b2=c(b/.1),f(bh/.1)
if a2<b1 or b2<a1: print(-1)
else:
    if b1<=a1<=b2: print(a1)
    elif a1<=b1<=a2: print(b1)
    elif b1<=a2<=b2: print(a2)
    elif a1<=b2<=a2: print(b2)

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

Solution (Python):
from sys import exit

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

x = -(-A // 0.08)
y = B // 0.1

min_result = int(max(x, y))

while int(min_result * 0.08) <= A or int(min_result * 0.1) <= B:
    if int(min_result * 0.08) == A and int(min_result * 0.1) == B:
        print(int(min_result))
        exit()
    min_result += 1

print(-1)

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

ans = -1
for i in range(10**5):
    if i*8//100 == A and i*10//100 == B:
        ans = i
        break
    elif i*8//100 > A and i*10//100 > B:
        break
print(ans)

Solution (Python):
from math import floor

A,B=map(int,input().split())
ans=-1
for i in range(1,floor(100/0.1)+1):
  if floor(i*0.08)==A and floor(i*0.1)==B:
    ans=i
    break
print(ans)

Solution (Python):
A,B=map(int,input().split())
 
ans=-1
for x in range(1000+1):
    if int(x*(8/100))==A and int(x*(10/100))==B:
        ans=x
        break

print(ans)

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

for n in range(2000):
    if int(n * 0.08) == a and int(n * 0.1) == b:
        print(n)
        break
if n ==1999:
    print(-1)

Solution (Python):
A, B = map(int, input().split())
ans = []
for i in range(1, 15000):
    if int(i * 8 / 100) == A and int(i * 10 / 100) == B:
        ans.append(i)
if ans:
    print(ans[0])
else:
    print(-1)

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

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):
import sys
a,b=map(int,input().split())
top=int((b+1)*10)
bottom=int(b*10)
for i in range(bottom,top):
    if int(i*0.08)==a:
        print(i)
        sys.exit()
print(-1)

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

for i in range(1010):
    if i*8//100==a and i//10==b:
        print(i)
        exit()
print(-1)

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())
for i in range(1, 3000):
  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())
s = {*range(25 * A, 25 * A + 25)} & {*range(20 * B, 20 * B + 20)}
s = {i // 2 for i in s if i % 2 < 1}
print(-1 * (len(s) < 1) or min(s))

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


if __name__ == "__main__":
    main()

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,b = readInts()
for i in range(1, 10001):
    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
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

a,b=MI()
for i in range(1,2000):
    x=(i*8)//100
    y=(i*10)//100
    
    if x==a and y==b:
        print(i)
        sys.exit()
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):
A, B = map(int, input().split())
import math
N = math.ceil(A / 0.08)
n = math.ceil(B / 0.1)
M = max(N, n)
m = min(N, n)
ans = -1
for i in range(m, M+1):
  if int(i*0.08) == A and int(i*0.1) == B:
    ans = i
    break
print(ans)

Solution (Python):
def solve():
    ans = 0
    A, B = map(int, input().split())
    lower8 = A/0.08
    upper8 = (A+1)/0.08
    lower10 = B/0.1
    upper10 = (B+1)/0.1
    for i in range(1,2001):
        if i>=lower8 and i<upper8 and i>=lower10 and i<upper10:
            return i
    return -1
print(solve())

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

A, B = inm()


def solve():
    for x in range(200000):
        a = int(x * 0.08 + 1e-9)
        b = int(x * 0.10 + 1e-9)
        if a == A and b == B:
            return x

    return -1


print(solve())

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

Solution (Python):
A,B = map(int,input().split())
flag = 0
for i in range(1,1001):
    if int(i*0.08)==A and int(i*0.1)==B:
        ans = i
        flag = 1
        break
if flag==0:
    print(-1)
else:
    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):
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

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

res = -1
p = int(B/0.1)

for i in range(p, p+10):
    if math.floor(i*0.08) == A:
        res = i
        break

print(res)

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

import math
ans=-1

for i in range(1251):
    sval_A=math.floor(i*0.08)
    sval_B=math.floor(i*0.10)
    if sval_A == A and sval_B == B:
        ans=i
        break

print(ans)

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

for i in range(p,int(p+10)):
    if math.floor(i * 0.08) == a:
        ans = i
        break

print(ans)

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

Solution (Python):


import sys
input=sys.stdin.readline

def main():
    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)
    
if __name__=="__main__":
    main()

Solution (Python):
import math

a,b = map(int,input().split())
ans = []
count = 0

for i in range(1,1001):
     if(math.floor(i * 0.08) == a and math.floor(i * 0.1) == b):
        ans.append(i)
        count += 1

if(count == 0):
    print('-1')
else:
    print(min(ans))

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

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

for i in range(1, 1010):
    a = int(i * 0.08)
    b = int(i * 0.1)
    if a == A and b == B:
        print(i)
        break
else:
    print(-1)

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

satA = []
i = 0
while True:
    if int(i * 0.08) == A:
        satA.append(i)
        i += 1
    else:
        if len(satA) != 0:
            break
        else:
            i += 1

for i in satA:
    if int(i * 0.1) == B:
        print(i)
        exit(0)

print(-1)

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

Solution (Python):
import math
A, B = map(int, input().split())
rate8max = math.floor((A+1)/0.08)
rate8min = math.ceil(A/0.08)
rate10max = math.floor((B+0.9)/0.1)
rate10min = math.ceil(B/0.1)
ans = -1
if rate10min >= rate8min and rate10min <= rate8max:
    for i in range(rate10min, rate8max+1):
        if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
            ans = i
            break
elif rate8min >= rate10min and rate8min <= rate10max:
    for i in range(rate8min, rate10max+1):
        if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
            ans = i
            break
    
elif rate10min >= rate8min and rate10max <= rate8max:
    for i in range(rate10min, rate10max+1):
        if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
            ans = i
            break
elif rate8min >= rate10min and rate8max <= rate10max:
    for i in range(rate8min, rate8max+1):
        if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
            ans = i
            break
print(ans)

Solution (Python):
import math
def main():
  A, B = map(int, input().split())
  
  
  
  for n in range(1, 1251):
    if math.floor(n * 0.08) == A and math.floor(n * 0.1) == B:
      print(n)
      return
  print(-1)
    
  
main()

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

if (int(12.5*a)+(a%2)) > 10*b+9 or (int(12.5*a)+(a%2))+12-(a%2) < 10*b:
    print(-1)
else:
    print(max((int(12.5*a)+(a%2)), 10*b))

Solution (Python):
A,B=map(int,input().split())
for i in range(1,10100//8+1):
    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())
x=10*b

import math
for i in range(10):
    if math.floor((x+i)*0.08)==a:
        print(x+i)
        exit(0)

print(-1)

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

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

Solution (Python):
import math


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

pred_a = math.ceil(a / 0.08)
pred_b = b * 10

ans = []
for i in range(13):
    for j in range(10):
        if pred_a+i == pred_b+j and int((pred_a+i)*0.08) == a and int((pred_b+j)*0.1) == b:
            ans.append(pred_a+i)
if len(ans)==0:
    print(-1)
else:
    print(min(ans))

Solution (Python):
import itertools
import functools
import math
from collections import Counter
from itertools import combinations

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

flg = 0
for i in range(1,1200+1):
    CHK_A= (i * 8) // 100
    CHK_B= (i * 10) // 100
    if A == CHK_A and B == CHK_B:
        print(i)
        exit()

print(-1)

Solution (Python):
import math
A, B = map(float, input().split())
lowerA = math.ceil(A/0.08)
upperA = math.floor((A+1)/0.08)      
lowerB = math.ceil(B/0.1)
upperB = math.floor((B+1)/0.1)
answer = -1
for i in range(lowerA, upperA):
  if (lowerB <= i) and (i < upperB):
    answer = i
    break
print(answer)

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

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

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

print(ans)

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

for i in range(1,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())
ans = '-1'
for x in range(10*B,10*(B+1)):
    if 8*x//100==A:
        ans = x
        break
print(ans)

Solution (Python):
import math
A,B = list(map(int,input().split()))
list08 = []
list10 = []
for i in range(math.floor(A/0.08),math.ceil((A+1)/0.08)+1):
    if math.floor(i*0.08) == A:
        list08.append(i)
for i in range(math.floor(B/0.10),math.ceil((B+1)/0.1)+1):
    if math.floor(i*0.10) == B:
        list10.append(i)
ans = list(set(list08) & set(list10))
if ans ==[]:
    print(-1)
else:
    print(min(ans))

Solution (Python):
import sys

A,B = (int(a) for a in input().split())
for i in range(10**4+1) :
    if (A <= i*0.08 < A+1) and (B <= i*0.1 < B+1) :
        print(i)
        sys.exit()
print(-1)

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

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

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

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

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

print(-1)

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

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

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

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

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

judge = "none"
for i in range(1, 1300):
    if int(i*0.08)==A and int(i*0.10)==B:
        print(i)
        judge = "have"
        break

if judge=="none":
    print(-1)

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

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

for i in range(0,1251):
    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())
n=math.ceil((a*100)/8)
m=int((a*100)/10)
result=[]
for i in range(m-100,n+100):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        result.append(i)
if result==[]:
    print(-1)
    exit()
print(min(result))

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
import sys
A,B= map(int, input().split())
for i in range(1,1002):
    if A==math.floor(i*0.08) and B==math.floor(i*0.1):
        print(i)
        sys.exit()
print("-1")

Solution (Python):
a,b = map(int,input().split())
ten = []
ei = []
for i in range(1,1010):
    if a <= i*0.08 < a+1:
        ei.append(i)
for j in range(1,1010):
    if b <= j*0.1 < b+1:
        ten.append(j)
case = set(ei) & set(ten)
if not case:
    print(-1)
else:
    print(min(case))

Solution (Python):
a,b = map(int,input().split())
b_min = b*10
b_max = (b+1)*10

for i in range(b_min,b_max):
    aa = int(i*0.08)
    if aa == a:
        print(i)
        exit()

print(-1)

Solution (Python):
def main():
    A,B = map(int, input().split())
    for i in range(50000):
        a = int(i * 0.08)
        b = int(i * 0.1)
        if a==A and b == B:
            print(i)
            return

    print(-1)






if __name__ == '__main__':
    main()

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

for i in range(1, 1101):
  if int(i*0.08) == A and int(i*0.10) == B:
    print(i)
    break
else:
  print(-1)

Solution (Python):
import sys

from math import floor
def main():
    a, b = map(int, input().split())
    for i1 in range(1251):
        if floor(i1 * 0.08) == a and floor(i1 * 0.1) == b:
            print(i1)
            sys.exit()
    print(-1)


if __name__ == '__main__':
    main()

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

for x in range(1251):
    if int(0.08 * x) == A and int(0.10 * x) == B:
        print(x)
        exit()
print(-1)

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

ans = -1

for i in range(10000,-1,-1):
    tax1 = int(i * 0.08)
    tax2 = int(i * 0.10)
    if tax1 == A and tax2 == B:
        ans = i

print(ans)

Solution (Python):
import sys 
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B = map(int, readline().split())
A1 = math.ceil(A * 12.5)
B1 = B * 10
A2 = math.ceil((A+1) * 12.5)
B2 = (B+1) * 10 
a = min(A1,B1)
b = max(A2,B2)
for i in range(a,b+1):
    if A1 <= i < A2 and B1 <= i < B2:
        print(i)
        sys.exit()
print(-1)

Solution (Python):
import math
a,b = [int(i) for i in input().split()]
ans=[]
for i in range(100000):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b: ans.append(i)
if len(ans) != 0: print(min(ans))
else: print(-1)

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

Solution (Python):
import math

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

flag = 0

for x in range(1,1252):
    if math.floor(0.08 * x) == A and math.floor(0.10 * x) == B:
        ans = x
        flag = 1
        break
if flag == 0:
    ans = -1

print(ans)

Solution (Python):
a,b=map(int,input().split())
l=max(0--a*25//2,b*10)
print([-1,l][l<min(-~a*25//2,-~b*10)])

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

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

Solution (Python):
a,b=map(int,input().split())
al,ar,bl,br=0--a*25//2,a*25//2+12,b*10,b*10+9
print([max(al,bl),-1][ar<bl or br<al])

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

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

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

for i in range(10001):
    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 x in range(0,10**6):
    
    
    ax = (8*x)//100
    bx = (10*x)//100
    
    if ax == a and bx == b:
        print(x)
        break
else:
    print(-1)

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

flag = 1
for i in range(1,1010,1):
  a = int(i*0.08)
  b = int(i*0.10)
  if a == A and b == B:
    flag = i
    break
  else:
    flag = -1
print(flag)

Solution (Python):
A, B = map(int, input().split())
ans = -1
for i in range(1,1300):
    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(1010):
    tax8 = int(i * 0.08)
    tax10 = int(i * 0.1)

    if a == tax8 and b == tax10:
        print(i)
        exit()

print(-1)

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

Solution (Python):
A, B = map(int, input().split())
ans = -1
for x in range(1010):
    if int(x*0.08) == A and int(x*0.1) == B:
        ans = x
        break

print(ans)

Solution (Python):
A, B = map(int, input().split())
ans = -1
for x in range(10001):
    if int(x*0.08) == A and int(x*0.1) == B:
        ans = x
        break

print(ans)

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

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

Solution (Python):
def resolve():
    A, B = list(map(int, input().split()))
    for x in range(1, 1000 +1):
        if int(0.08 * x) == A and int(0.10 * x) == B:
            print(x)
            return

    print('-1')
    return

resolve()

Solution (Python):






a, b = map(int, input().split())
List = [0]*10
ans = -1

for i in range(10):
    List[i] = b*10+i

for i in List:
    if int(i*0.08) == a:
        ans = i
        break;

print(ans)

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


dic=defaultdict(lambda:-1)
for i in range(100000,0,-1):
    dic[int(i*0.08),int(i*0.10)]=i
    
print(dic[a,b])

Solution (Python):

A, B = map(int,input().split())
if(12.5*A-10*(B+1)>=0 or 10*B-12.5*(A+1)>=0):
    print(-1)
else:
    if(A*100 % 8 == 0):
        print(max([10*B,A*100//8]))
    else:
        print(max([10*B,A*100//8+1]))

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

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

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

ans = -1
for num in a:
  if num in b:
    ans = num
    break;
print(ans)

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

Solution (Python):
A,B=map(int,input().split())
ans=-1
for i in range(10,1263):
    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 x in range(B*10,B*10+10):
    if x*0.08//1 == A:
        print(x)
        break
else:
    print(-1)

Solution (Python):
def main():
    A, B = map(int, input().split())
    x = int(A/0.08)
    y = int((A+1)/0.08)
    for i in range(x, y+1):
        if int(i*0.08) == A and int(i*0.1) == B:
            print(i)
            return
    print(-1)

main()

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

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

print(ans)

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

Solution (Python):
import math

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

for i in range(1010):
    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())

_A = int(A//0.08)
_B = int(B//0.10)

r = sorted([_A,_B])
ans = []
for i in range(r[0],r[1]+2):
    if int(i*0.08) == A and int(i*0.1) == B :
        ans.append(i)

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

Solution (Python):
a = list(map(int, input().split()))
b = [i for i in range(1010)]
c = 0
for f in b:
  if f * 8 // 100 == a[0] and f * 10 // 100 == a[1]:
    print(f)
    c += 1
    break
if c == 0:
  print(-1)

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    
    for i in range(1,1251):
        if int(i*0.08)==a and int(i*0.1)==b:
            ans=i
            break
        ans=-1
    
    print(ans)
    
if __name__ == '__main__':
    do()

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 = list(map(int,input().split()))
 
A_min=12*A+math.ceil(0.5*A)
A_max=12*(A+1)+math.floor(0.5*(A+1))
B_min=10*B
B_max=10*(B+1)
 
if A_max <= B_min:
    print(-1)
elif B_max <= A_min:
    print(-1)
else:
    print(max(A_min,B_min))

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 = list(map(int,input().split()))

flag = -1
for x in range(1,10001):
    if (x *0.08) // 1 == A and (x*0.1) // 1 == B:
        flag = x
        break

print(flag)