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





def tax(x):
  return 8 * x // 100, 10 * x // 100







x = int(min(A / 0.08, B / 0.1))
Xmax = x * 1.5
while x <= Xmax:
  a, b = tax(x)

  if a == A and b == B:
    print(x)
    break
  x += 1
else:
  print(-1)

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

ans=-1
for n in range(10*b,10*(b+1)):
    if int(n*1.1)-b == int(n*1.08)-a:
        ans=n
        break
print(ans)

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

Solution (Python):

import sys
input=sys.stdin.readline

def main():
    numbers=[]
    a,b = map(int,input().split())
    
    tmp1=int(a/0.08)
    tmp2=int(b/0.10)

    ans=[]

    for i in range(min(tmp1,tmp2),max(tmp1,tmp2)+2):
        if int(i*0.08) == a and int(i*0.10) == b:
            ans.append(i)

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


if __name__=="__main__":
    main()

Solution (Python):
a, b = map(int, input().split())
i = 1
f = 0
while True:
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        f = 1
        break
    if int(i*0.08)>a:
        break
    i += 1
if not f:
    print(-1)

Solution (Python):
def sep():
    return map(int,input().strip().split(" "))
def lis():
    return list(sep())

a,b=sep()
for i in range(1,10005):
    if (i*8)//100==a and (i*10)//100==b:
        print(i)
        quit()
print(-1)

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

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

list1=list(range(1,1001,1))

s=0
for i in list1:
    x=i//12.5
    y=i//10
    if x==A and y==B:
        print(str(i))
        s=s+1
        sys.exit()

print('-1')

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

for i in range (11000):
  if a <= i*0.08 <a+1:
    if b<= i*0.1 <b+1:
      print(i)
      exit()
print(-1)

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

Solution (Python):
from math import ceil

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

min8 = ceil(A*12.5)
max8 = int((A+1)*12.5-0.001)
min10 = ceil(B*10)
max10 = int((B+1)*10-0.001)


if max8<min10 or max10<min8:
    print(-1)
else:
    print(max(min8,min10))

Solution (Python):
A,B = map(int,input().split())
X1 = int(A // 0.08)
X2 = int( (A+1) // 0.08)
array1 = []
for i in range(X1+1,X2):
  array1 += [i]
Y1 = int(B // 0.1)
Y2 = int( (B+1) // 0.1)
array2 =[]
for j in range(Y1+1,Y2):
  array2 += [j]
N1 = len(array1)
for t in range(N1):
  if array1[t] in array2:
    print(array1[t])
    exit()
print(-1)

Solution (Python):



def main():
    A, B = map(int, input().split())
    ans = -1
    for i in range(10001):
        if i * 8 // 100 == A and i // 10 == B:
            ans = i
            break

    print(ans)

if __name__ == "__main__":
    main()

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

ma_min, ma_max = math.ceil(a / 0.08), math.ceil((a + 1) / 0.08 - 1)
mb_min, mb_max = math.ceil(b / 0.1), math.ceil((b + 1) / 0.1 - 1)

tmp_ans = max(ma_min, mb_min)
if ma_min <= tmp_ans <= ma_max and mb_min <= tmp_ans <= mb_max:
    ans = tmp_ans
else:
    ans = -1
print(ans)

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

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

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

Solution (Python):

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

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

if ans == 0:
    print(-1)
else:
    print(i)

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

Solution (Python):
from math import floor

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

d = False

for p in range(1009):
    if floor(p * 0.08) == a and floor(p * 0.1) == b:
        print(p)
        d = True
        break

if not d:
    print(-1)

Solution (Python):
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

a,b=map(int,input().split())
ans=1
while ans*8//100!=a or ans//10!=b:
    ans+=1
    if ans>2*10**5:
        print(-1)
        exit()
print(ans)

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

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    ans=-1
    
    A,B=MI()
    for i in range(10000):
        a=int(i*0.08)
        b=int(i*0.1)
        
        if a==A and b==B:
            ans=i
            break
        
    print(ans)


main()

Solution (Python):
import math
a,b=map(int,input().split())
ast=math.ceil(a*12.5)
aend=math.ceil((a+1)*12.5)-1
bst=b*10
bend=(b+1)*10-1
flag=0
for i in range(bst,bend+1):
    if ast<=i<=aend:
        print(i)
        flag=1
        break
if flag==0:
    print(-1)

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

for i in range(1010):
    if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
        ans = i
        break

print(ans)

Solution (Python):
import math

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

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

print(-1)

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




x=int(B*10)
while x<10*(B+1):
	if A<=x*0.08 and x*0.08<A+1:
		print(x)
		exit()
	x+=1
print(-1)

Solution (Python):
import math
A, B = map(int, input().split())
b1 = B*10
b2 = b1 + 10

for i in range(b1, b2):
    if math.floor(i*0.08) == A:
        print(i)
        break

    if i == b2-1:
        print(-1)

Solution (Python):
import math
A, B = map(int, input().split())
b1 = B*10
b2 = b1 + 10

for i in range(b1, b2):
    if math.floor(i*0.08) == A:
        print(i)
        break

    if i == b2-1:
        print(-1)

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

    if i == 1009:
        print(-1)

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

Solution (Python):
A, B = map(int, input().split())
l = []
for i in range(1, 10000):
  a = i * 0.08
  b = i * 0.1
  if a > A+1 and b > B+1:
    break
  elif A <= a < A+1 and B <= b < B+1:
    l.append(i)

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

Solution (Python):
a,b = map(int,input().split())
i = 0
x = int(a/0.08)
while True:
    if int((x+i)*0.1) == b and int((x+i)*0.08) == a:
        ans = int(x+i)
        break
    elif int((x+i)*0.1) > b:
        ans = '-1'
        break
    else:
        i += 1
print(ans)

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

ans = -1
for v in range((100*10)+100):
  t8 = int(v * 0.08)
  t10 = int(v * 0.1)

  if t8 > a or t10 > b:
    break

  if t8 == a and t10 == b:
    ans = v
    break

print(ans)

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

for i in range(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())
x=[]
for i in range(1,1251):
    if math.floor(i*0.08)==a:
        if math.floor(i*0.1)==b:
            x.append(i)
if len(x)==0:
    print(-1)
else:
    print(min(x))

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

Solution (Python):

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

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

Solution (Python):
import math

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

a1 = (A+1)/0.08
a2 = A/0.08
b1 = (B+1)/0.1
b2 = B/0.1


if a2 >= b1 or b2 >= a1:
    print(-1)
else:
    print(math.ceil((max(a2, b2))))

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

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

if ans == 10000:
    print(-1)
else:
    print(ans)

Solution (Python):
import math
A, B = map(int, input().split())
ans = -1
for a in range(math.ceil(A/0.08), math.ceil((A+1)/0.08)):
    if int(a*0.1) == B:
        ans = a
        break

print(ans)

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

Xbmin = 10 * B
Xbmax = 10 * B + 10
ans = -1

for x in range(Xbmin, Xbmax):
    if 100 * A <= x * 8 and x * 8 < 100 * (A + 1):
        ans = x
        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)
        break
else:
    print(-1)

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

Solution (Python):
A, B = map(int, input().split(' '))
for i in range(1, 1500):
    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*12.5 >= (b+1) *10 or b*10 >= (a+1)*12.5:
  print(-1)
else:
  m = max([a*12.5,b*10])
  M = min([(b+1) *10, (a+1)*12.5])
  i = m//1
  if m == i:
    print(int(i))
  else:
    print(int(i+1))

Solution (Python):
[A, B] = [int(i) for i in input().split()]
a = []
b = []
if A%2 == 1:
    s = 0
    t = 1
else:
    s = 1
    t = 0
     
for i in range(int(A*12.5) + t, int((A+1)*12.5) + s):
    a.append(i)
for i in range(10*B, 10*(B+1)):
    b.append(i)

ans = -1
for i in range(len(a)):
    if b[0] <= a[i] and a[i] <= b[-1]:
        ans = a[i]
        break
print(ans)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

a,b = na()
ans = -1
for i in range(1, 1001):
    if a == math.floor(i * 0.08) and b == math.floor(i * 0.10):
        ans = i
        break
print(ans)

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

Solution (Python):
import math

def main():
    A, B = map(int, input().split())
    a_min = int(math.ceil(A / 0.08))
    a_max = int(math.floor((A+1) / 0.08)) - 1
    b_min = 10 * B
    b_max = 10 * (B+1) - 1
    if a_max < b_min or b_max < a_min:
        print(-1)
    else:
        print(max([a_min, b_min]))


if __name__ == '__main__':
    main()

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

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

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

ans1 = 0
ans2 = 0

for i in range(10000):
  ans1 = int(i * 0.08)
  ans2 = int(i * 0.10)
  
  if (ans1) == A and int(ans2) == B:
    print(i)
    exit()
    
print(-1)

Solution (Python):
import sys
a, b = map(int,input().split())
lsta = []
lstb = []
if (a%2 == 1):
    lsta.append(int(a*12.5//1 + 1))
else:
    lsta.append(int(a*12.5))
for i in range(12):
    if ((lsta[0] + i + 1)*0.08//1 == a):
        lsta.append(lsta[0] + i + 1)

lstb.append(b*10)
for i in range(9):
    lstb.append(lstb[0] + i + 1)

for i in range(len(lsta)):
    if (lsta[i] in lstb):
        print(lsta[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:
    kakaku = i
    print(kakaku)
    break
    
else:
  print(-1)

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

for i in range(1001):
    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(10*B,10*(B+1)):
    if A/0.08<=i<(A+1)/0.08:
        print(i)
        x=0
        break
    else:
        x=-1
if x:
    print(x)

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

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



min8 = a*(100/8)
max8 = (a+1)*(100/8)
min10 = b*10
max10 = (b+1)*10
mi = int(max(min8, min10) - 0.001) + 1
ma = int(min(max8, max10) - 0.001)
if mi > ma:
    ans = -1
else:
    ans = mi
print(ans)

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

print(-1)

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(1500):
    if i * 8 // 100 == A and i * 10 // 100 == B:
        print(i)
        break
else:
    print(-1)

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

c = math.ceil
min8, max8 = c(a*12.5), c((a+1)*12.5)
min10, max10 = c(b*10), c((b+1)*10)

l8, l10 = list(range(min8, max8)), list(range(min10, max10))
s8, s10 = set(l8), set(l10)

ss = s8 & s10

print(min(ss) if len(ss) >0 else -1)

Solution (Python):
def f():
  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)
      return
  print(-1)
f()

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

Solution (Python):

"""
Created on Mon Sep  7 10:51:17 2020

@author: liang
"""
A, B = map(int, input().split())

res = B*10

for i in range(10):
    tmp =int((res + i)*0.08)
    if  tmp == A:
        print(res+i)
        break
else:
    print(-1)

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

A=math.ceil(a*12.5)
B=math.ceil(b*10)

x=math.floor(B*0.08)
y=math.floor(A*0.1)

if x==a and y==b :
    if A>B :
        print(B)
    else :
        print(A)

elif x==a :
    print(B)
elif y==b :
    print(A)
else :
    print(-1)

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

for n in range(1,1200):
  if int(n*0.08) == A and int(n*0.1) == B:
    print(n)
    exit()
print("-1")

Solution (Python):
a, b = map(int, input().split())
flag = 0
for i in range(2000):
    if (i*0.08)//1 == a:
        if (i*0.1)//1 == b:
            print(i)
            flag += 1
            break

else:
    if flag == 0:
        print("-1")

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

ans = -1

for i in range(10000):
    if int((i/100)*8) == A and int((i/100)*10) == B:
        ans = i
        break

print(ans)

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

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

for num in range(1, 2000):
    if int(num * 0.08) == a and int(num * 0.1) == b:
        print(num)
        exit()
else:
    print(-1)

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

AA = A * 100 / 8
BB = B * 100 / 10

L = []
for i in range(10000):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        L.append(i)
    
L = sorted(L)
if L == []:
    print(-1)
    exit()

print(L[0])

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

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

Solution (Python):
a,b = [int(x) for x in input().split()]
res = -1
for i in range(20000):
  if i * 8 // 100 == a and i * 10 // 100 == b:
    res = i
    break
print(res)

Solution (Python):
def main():
    a, b = map(int, input().split(" "))
    for i in range(1,1010):
        ta = i*8//100
        tb = i*10//100
        if ta == a and tb == b:
            print(i)
            return
    print(-1)
    

if __name__ == "__main__":
    main()

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

def candidate(tax, tax_rate, candidate):
  candidate.append(math.ceil(tax / tax_rate))
  i = candidate[0] + 1
  while tax == math.floor(i * tax_rate):
    candidate.append(i)
    i += 1

candidate(A, 0.08, candidate_a)
candidate(B, 0.1, candidate_b)

if candidate_a[0] <= candidate_b[0]:
  if candidate_a[-1] >= candidate_b[0]:
    print(candidate_b[0])
  else: 
    print(-1)
else:
  if candidate_b[-1] >= candidate_a[0]:
    print(candidate_a[0])
  else:
    print(-1)

Solution (Python):
A, B = map(int, input().split())
for i in range(1, 12500):
  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,1001):
        if 8*i//100 == a and i//10 == b:
                print(i)
                exit()
print('-1')

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

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

Solution (Python):
import math

A, B = map(int, input().split())
min1 = math.floor(A * 25/2)
max1 = math.ceil((A + 1) * 25/2)
ans_lis = []
ans1 = False
ans2 = False
for i in range(min1, max1):
  if A == math.floor(i * 2/25):
    ans1 = True
    ans_lis.append(i)
for x in ans_lis:
  if B == math.floor(x * 1/10):
    ans2 = True
    ans = x
    break
if ans1 == True and ans2 == True:
  print(x)
else:
  print(-1)

Solution (Python):
import math

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

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

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

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

for i in range(1,10001):
  a_num=math.floor(i*0.08)
  b_num=math.floor(i*0.1)
  if (a_num==a) and (b_num==b):
    print(i)
    exit()
    
print(-1)

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

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

x = a // 0.08
y = b // 0.10
x, y = int(x), int(y)
minv = min(x, y)
maxv = max(x, y)
ans = []

for i in range(minv, maxv+2):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        ans.append(i)

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

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

for i in range(10**5):
    if (8*i//100) == a and (i//10) == b:
        ans = i
        break
    
print(ans)

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

answer = -1
for i in range(1,10100):
  if i * 8 // 100 == a and i * 10 // 100 == b:
    answer = i
    break
    
print(answer)

Solution (Python):
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b = mi()

for i in range(1,1010,1):
    if math.floor(i*0.08) == a and math.floor(i*0.10) == b:
        print(i)
        exit()
print(-1)

Solution (Python):
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b = mi()

for i in range(1,1009,1):
    if math.floor(i*0.08) == a and math.floor(i*0.10) == b:
        print(i)
        exit()
print(-1)

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

ans = ""
for i in range(1,1251):
  a = math.floor(i * 0.08)
  b = math.floor(i * 0.1)
  if a == A and b == B:
    ans = i
    break
    
print(ans if ans != "" else -1)

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

Solution (Python):
import math

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

volume_A = math.floor(A / 0.08)
volume_B = math.floor(B / 0.1)

min_A, max_A = math.inf, -math.inf
range_A = math.floor(1 / 0.08)
min_B, max_B = math.inf, -math.inf
range_B = math.floor(1 / 0.1)



for i in range(volume_A - range_A, volume_A + range_A):
    if math.floor(i * 0.08) == A:
        min_A = min(min_A, i)
        max_A = max(max_A, i)

for j in range(volume_B - range_B, volume_B + range_B):
    if math.floor(j * 0.1) == B:
        min_B = min(min_B, j)
        max_B = max(max_B, j)

ans_A = set()
for i in range(min_A, max_A + 1):
    ans_A.add(i)


ans_B = set()
for j in range(min_B, max_B + 1):
    ans_B.add(j)


ans = ans_A & ans_B

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

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

Solution (Python):
def main():
  A, B = map(int,input().split())
  i1 = max(A * 12.5, B * 10.0)
  i2 = min((A + 1) * 12.5, (B + 1) * 10.0)
  i = int(i1)
  while i < i2:
    if i >= i1: return i
    i += 1
  return -1

ans = main()
print(ans)

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    A, B = MI()
    x = 10 * B
    for i in range(x, x + 10):
        y = int(i * 8 / 100)
        if y == A:
            print(i)
            exit()
    print(-1)
if __name__ == "__main__":
    main()

Solution (Python):
import math
a,b=map(int,input().split())
r_max=int((b+1)//0.1)
r_min=int(b//0.1)
ans=0
for i in range(r_max,r_min,-1):
    if math.floor(i*0.08)==a:
        ans=i
print(-1 if ans==False else ans)

Solution (Python):

import sys
import decimal
def input():
    return sys.stdin.readline()[:-1]

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

    for i in range(1, 10 ** 4):
        a = int(decimal.Decimal(i * 0.08))
        b = int(decimal.Decimal(i * 0.1))
        if a == A and b == B:
            print(i)
            exit()
    print(-1)

if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
flg=0
for i in range(1001):
    c=int(i*1.08)-i
    d=int(i*1.1)-i
    if c==a and b==d:
        print(i)
        flg=1
        exit()
if flg==0:
    print(-1)

Solution (Python):
a,b=input().split()
a=int(a)
b=int(b)
x=10
y=int(x*8/100)
z=int(x*10/100)
i=0
while x<10000:
  if int(x*8/100)==a and int(x*10/100)==b:
    print(x)
    break
  else:
    x=x+1
if x==10000:
  print("-1")

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

bb = b * 10

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

print(ans)

Solution (Python):

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

import math
price=[]
for i in range(10100):
    if math.floor(i*0.08)==A and math.floor(i*0.1)==B:
         price.append(i)
if len(price)==0:
    print(-1)
else:
    print(sorted(price)[0])

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

ans = '-1'
for i in range(1010):
  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(1010)[::-1]:
  if i*8 // 100 == A and i // 10 == B:
    ans = i

print(ans)

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


XstartA = A / 0.08
XendA = (A + 1) / 0.08

XstartB = B / 0.1
XendB = (B + 1) / 0.1

start = XstartA
if XstartA < XstartB:
    start = XstartB

end = XendA
if XendB < XendA:
    end = XendB

S = int(start)
E = int(end) + 1

ans = -1
for i in range(S, E + 1):
    if start <= i and i < end:
        ans = i
        break

print(ans)

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

ans = '-1'
for i in range(1001)[::-1]:
  if i*8 // 100 == A and i // 10 == B:
    ans = i

print(ans)

Solution (Python):
import math

def solve():
    A, B = [int(i) for i in input().split()]
    a = A / 0.08
    b = B / 0.1
    mi = min(a, b)
    ma = max(a, b)
    for i in range(math.floor(mi), math.ceil(ma) + 1):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            print(i)
            exit()
    print(-1)

if __name__ == "__main__":
    solve()

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

st=.08
lt=.1
s=[]
l=[]

for i in range(1262):
    if a/st<=i<(a+1)/st:
        s.append(i)

for i in range(1262):
    if b/lt<=i<(b+1)/lt:
        l.append(i)

t=[]

for i in s:
    if i in l:
        t.append(i)

if not t:
    print('-1')
else:
    print(min(t))

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

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

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

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


if __name__ == "__main__":
    main()

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

q=[]
for i in range(1,20000):
    if a==floor(i*0.08) and b==floor(i*0.1):
        q.append(i)

if q:
    print(min(q))
else:
    print(ans)

Solution (Python):

import sys
A, B = list(map(int, input().split()))
for i in range(1,1009+1):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        sys.exit(0)

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


if a1.is_integer():
  x1 = a1
else:
  x1 = a1 + 1
if a2.is_integer():
  x2 = a2
else:
  x2 = a2 + 1
if b1.is_integer():
  y1 = b1
else:
  y1 = b1 + 1
if b2.is_integer():
  y2 = b2
else:
  y2 = b2 + 1
  
s1 = set([i for i in range(int(x1), int(x2))])
s2 = set([i for i in range(int(y1), int(y2))])
s = s1 & s2
if len(s) == 0:
  print(-1)
else:
  print(min(s1 & s2))

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

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())
for i in range(10**3 + 1):
    if (i*8)//100 == a and (i*10)//100 == b:
        print(i)
        exit()
print(-1)

Solution (Python):

import sys
from decimal import Decimal as D

input = sys.stdin.readline


def ST():
    return input().rstrip()


def I():
    return int(input())


def MI():
    return map(int, input().split())


def LI():
    return list(MI())


A, B = MI()

for i in range(1, 2501):
    a = int(D(i) * D("0.08"))
    b = int(D(i) * D("0.1"))

    if A == a and B == b:
        print(i)
        exit()

print(-1)

Solution (Python):
def check(x):
    if (x*10)//100>=b and (x*8)//100>=a: return True
    else: return False

a,b=map(int,input().split())
l=0 
r=10**9
while(l<r):
    mid=(l+r)//2
    if check(mid):r=mid
    else: l=mid+1
print(l if (l*10)//100==b and (l*8)//100==a else -1)

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

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