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())
ans = []

for i in range(1001):
    tax_eight = int(i * 0.08)
    tax_ten = int(i * 0.1)
    if A == tax_eight and B == tax_ten:
        ans.append(i)

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

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

for i in range(1, 1001):
    hati = int(i * 0.08)
    juu = int(i * 0.1)
    
    if hati == a and juu == b:
        flag = 1
        print(i)
        break
    
if flag == 0:
    print("-1")

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

for i in range(1, 1001):
    hati = int(i * 0.08)
    juu = int(i * 0.1)
    
    if hati == a and juu == b:
        flag = 1
        print(i)
        break
    
if flag == 0:
    print("-1")

Solution (Python):
import math

a,b = map(int,input().split())
 
ans_a = int(math.ceil(a/0.08))
ans_b = int(b/0.1)
 
if ans_a <= ans_b:
  if int(ans_b*0.08) == a:
    print(ans_b)
  else:
    print(-1)
elif ans_b < ans_a:
  if int(ans_a*0.1) == b:
    print(ans_a)
  else:
    print(-1)

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

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

m = 1/0.08
M = 100/0.08



for i in range(13, 1250):
    a = int(i * 0.08)
    b = int(i * 0.10)
    if a == A and b == B:
        print(i)
        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)
    break
else:
  print(-1)

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

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

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

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

Solution (Python):
import math

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

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

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

ans = 0
for i in range(10000):
    if (i * 8 //100) == 0:
        pass
    else:
        if (i * 8 //100) == A and (i * 10 //100) == B:
            print(i)
            ans = 1
            break

if ans == 0:
    print(-1)

Solution (Python):
import math
a,b = list(map(int, input().split()))
def zeinuki(tax, ratio):
    _min=math.ceil(tax/ratio)
    _max=math.ceil((tax+1)/ratio)-1
    return _min, _max

c08=zeinuki(a, 0.08)
c10=zeinuki(b, 0.1)
if c10[0]>c08[1] or c08[0]>c10[1]:
    print(-1)
else:
    print(max(c08[0], c10[0]))

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

for i in range(B*10,(B+1)*10):
    if i*8//100 == A:
        print(i)
        exit()

print(-1)

Solution (Python):
a,b = map(int,input().split())
for i in range(1011):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        break
    if i == 1010:
        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.10) == b:
        print(i)
        break
else:
    print('-1')

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

if a%2 == 0:
    a_list = [(a//2)*25+i for i in range(13)]
else:
    a_list = [(a//2)*25+i+13 for i in range(12)]

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

flag = 0

for i in range(len(b_list)):
    for j in range(len(a_list)):
        if a_list[j] == b_list[i]:
            print(a_list[j])
            flag = 1
        if flag == 1:
            break
    if flag == 1:
        break

if flag == 0:
    print(-1)

Solution (Python):

from math import floor

def main():
    A, B = map(int, input().split())
    for i in range(1, 1300):
        if floor(i * 0.08) == A and floor(i * 0.10) == B:
            print(i)
            exit()
    print('-1')

if __name__ == '__main__':
    main()

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

import math
x = 0.99999999999999999999
amin = math.ceil(a/0.08)
amax = int((a+x)//0.08) 
bmin = math.ceil(b/0.10)
bmax = int((b+x)//0.10)

amin,amax,bmin,bmax 

ans = -1
for i in range(amin,amax+1):
  if i >= bmin and i <= bmax:
    ans = i
    break

print(ans)

Solution (Python):

import math
A, B = map(int, input().split())
l = []
for i in range(2000):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        l.append(i)
if len(l) != 0:
    print(min(l))
else:
    print(-1)

Solution (Python):
def main():
    from math import ceil

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

    la, ra = ceil(A * 12.5), ceil((A + 1) * 12.5)
    lb, rb = B * 10, (B + 1) * 10

    L, R = max(la, lb), min(ra, rb)  

    if L >= R:
        print(-1)
        return

    print(L)


if __name__ == '__main__':
    main()

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

x = []
i = 1
n = int(a/0.08) + int(b/0.1) + 2

for i in range(0,n):
  if(int(0.08*i) == a and int(0.1*i) == b):
    x.append(i)
    
if(len(x) != 0):
  print(min(x))
else:
  print(-1)

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

Solution (Python):
import math

A, B = map(int,input().split())
for num in range(1,10000):
    if math.floor(num * 0.08) == A and math.floor(num * 0.1) == B:
        print(num)
        break
else:
    print(-1)

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

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

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; cnt = 0; ansli = []; tmpli = []; candili = []; stillset = set()
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def s_list(): return list(input())
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]
def mi(n): return [wi() for _ in range(n)]
def num__grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]
def grid(n): return [s_list() for _ in range(n)]

a, b = wi()
for x in range(10000):
    if int(0.08 * x) == a and int(0.1 * x) == b:
        print(x)
        exit()
print(-1)

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):
import math
A,B=map(int,input().split())
a=math.ceil(A/0.08)
aa=math.floor((A+1)/0.08)
for i in range(a,aa):
  if B<=i*0.1<B+1:
    print(i)
    exit()
else:
  print('-1')

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    A, B = LI()
    A_bottom,A_upper = A/0.08,(A+1)/0.08
    B_bottom,B_upper = B/0.10,(B+1)/0.10
    
    if A_bottom>=B_bottom and A_bottom<B_upper:
        print(int(A_bottom) if A_bottom<=int(A_bottom) else int(A_bottom)+1)
    elif B_bottom>=A_bottom and B_bottom<A_upper:
        print(int(B_bottom) if B_bottom<=int(B_bottom) else int(B_bottom)+1)
    else:
        print(-1)

main()

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

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

x1 = -(-25*A//2)
x2 = 25*(A+1)//2
x3 = 10*B
x4 = 10*(B+1)


if x1 <= x3 and x3 < x2:
  print(x3)
elif x3 <= x1 and x1 < x4:
  print(x1)
else:
  print(-1)

Solution (Python):
import sys

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

print(-1)

Solution (Python):
import sys

def ep(*params):
    print(*params,file=sys.stderr)

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

    

aa = int((A / 8 * 100))
bb = int(B / 10 * 100)
ep(aa,bb)

sa = set()
sb = set()
for a in range(aa-13,aa+14):
    if int(a * 0.08) == A:
        sa.add(a)
for b in range(bb-11,bb+12):
    if int(b * 0.10) == B:
        sb.add(b)
ep(sa,sb,sa&sb)
s = sa&sb
if len(s) > 0:
    print(min(s))
else:
    print(-1)

Solution (Python):

import math















def main():

    A, B = map(int, input().split())
    a1 = A * 12.5
    a2 = (A + 1) * 12.5
    b1 = B * 10
    b2 = (B + 1) * 10

    ans = math.ceil(max(a1, b1))
    if ans < a2 and ans < b2:
        print(ans)
    else:
        print("-1")


if __name__ == '__main__':
    main()

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

n = b * 10

for i in range(10):
    if a == int((n+i)*0.08):
        print(n+i)
        exit()

print(-1)

Solution (Python):
A, B = map(int, input().split())
rmin = B*10
rs = []
for r in range(rmin, rmin+10+1):
  if r*8//100 == A and r*10//100 == B:
    rs.append(r)
if len(rs) == 0:
  print(-1)
else:
  r = min(rs)
  print(r)

Solution (Python):

import math


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


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

Solution (Python):
A, B= map(int, input().split())
money = B*10
ans=-1
while money//10==B:
	if int(money*0.08)==A:
		ans=money
		break
	money+=1
print(ans)

Solution (Python):
A,B=map(int,input().split())
ans=[]
for i in range(1,2000):
  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):
import math
A,B=map(float,input().split())

a=math.ceil(A/0.08)
b=math.ceil(B/0.10)

c=max(a,b)
d=int(c*0.08)
e=int(c*0.1)

if A==d and B==e:
    print(int(c))
else:
    print(-1)

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

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

Solution (Python):
import math
A,B=map(int,input().split())
cal,cal2=0,0
ans=[]

for i in range(1200):
    cal=math.floor(i*0.08)
    cal2=math.floor(i*0.1)

    if cal==A and cal2==B:
        ans.append(i)


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

Solution (Python):



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

for x in range(1, 100000):
  if int(x * 0.08) == a and int(x * 0.1) == b:
    print(x)
    exit()

print(-1)

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):
from math import ceil, floor

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

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

a=True
for i in range(10000):
    if int(0.08*i)==A and int(0.10*i)==B:
        print(i)
        a=False
        break
if a==True:
    print(-1)

Solution (Python):
from math import floor

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

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

for i in range(100000):
    if (i * 8) // 100 == A and (i * 10) // 100 == B:
        print(i)
        exit()

print(-1)

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

print(-1)

Solution (Python):
A, B = map(int, input().split())
import math
a1 = math.ceil(A/0.08)
a2 = math.floor((A+1)/0.08)
b1 = math.ceil(B/0.1)
b2 = math.floor((B+1)/0.1)
aa = list(range(a1, a2+1))
bb = list(range(b1, b2+1))
ab = set(aa)&set(bb)
ab = list(ab)
ab.sort()
if len(ab)>1:
  print(ab[0])
else:
  print(-1)

Solution (Python):
A, B = map(int, input().split())
for ans in range(1, 1001):
    tmp_A = ans * 8 // 100
    tmp_B = ans // 10
    if tmp_A == A and tmp_B == B:
        print(ans)
        exit()
print('-1')

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    a,b=map(int,readline().split())

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

if __name__=="__main__":
    main()

Solution (Python):
a,b = map(int,input().split())
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):
A,B = map(int,input().split())
a1 = A/0.08
a2 = (A+1)/0.08
X = []
for i in range(13,1263):
    if a1<=i<a2:
        X.append(i)
b1 = B/0.1
b2 = (B+1)/0.1
x = -1
for y in X:
    if b1<=y<b2:
        x = y
        break
print(x)

Solution (Python):
A, B = map(int,input().split())
for k in range(1,20000):
    if int(k*1.08) == A+k and int(k*1.10) == B+k:
        print(k)
        exit(0)
print(-1)

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

for X in range(1, max(A * 13, B * 10) + 1):
    A_tmp = X * 8 // 100
    B_tmp = X * 10 // 100
    if A_tmp == A and B_tmp == B:
        ans = X
        break
else:
    ans = -1

print(ans)

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

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

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

  return

if __name__ == "__main__":
  resolve()

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

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

Solution (Python):
import math
a,b = map(int,input().split())
sup = math.floor((a+1)/0.08)

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

ans = []
for ans in range(1,1251):
    if math.floor(ans*0.08) == A and math.floor(ans*0.1) == B:
        print(ans)
        exit()

print(-1)

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

flag = True
for i in range(1,1010):
    if (i * 8 // 100) == A and (i * 10 // 100) == B:
        print(i)
        flag = False
        break

if flag:
    print(-1)

Solution (Python):

A, B = map(int, input().split())
for ans in range(1, 100000):
    if ans * 8 // 100 == A and ans * 10 // 100 == B:
        print(ans)
        exit()

print(-1)

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

i = 10*B
Flag = True
while i < 10*(B+1) and Flag == True:
  if (i*8/100)//1 == A:
    c = i
    Flag = False
  i += 1
print(c)

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

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

Solution (Python):
A,B = map(int,input().split())
a1 = A/0.08
if a1!=int(A/0.08):
    a1 = int(A/0.08)+1
else:
    a1 = int(A/0.08)
a2 = (A+1)/0.08
if a2!=int((A+1)/0.08):
    a2 = int((A+1)/0.08)+1
else:
    a2 = int((A+1)/0.08)
b1 = B/0.1
if b1!=int(B/0.1):
    b1 = int(B/0.1)+1
else:
    b1 = int(B/0.1)
b2 = (B+1)/0.1
if b2!=int((B+1)/0.1):
    b2 = int((B+1)/0.1)+1
else:
    b2 = int((B+1)/0.1)
X = range(a1,a2)
Y = range(b1,b2)
x = -1
for i in X:
    if i in Y:
        x = i
        break
print(x)

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

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

Solution (Python):
import sys

import math
from fractions import Fraction
import itertools

input=sys.stdin.readline

a,b=map(int,input().split())
if (a+1)/0.08<=b/0.1 or (b+1)/0.1<=(a/0.08):
    print(-1)
    exit()
print(int(math.ceil(max(a/0.08,b/0.1))))

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

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

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

Solution (Python):
a, b = map(int, input().split())
ans = -1
for x in range(13, 1250):
    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())
for x in range(10000):
    a = int(x * 0.08)
    b = int(x * 0.1)
    if a == A and b == B:
        print(x)
        exit()
print(-1)

Solution (Python):
a,b=map(int,input().split())
for i in range(1,10001):
  tax_a=int(i*0.08)
  tax_b=int(i*0.10)
  if tax_a==a and tax_b==b:
    print(i)
    exit(0)
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.1)==b:
    print(i)
    exit()
print(-1)

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

  return

if __name__ == "__main__":
  resolve()

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

for i in range(1, 10001):
    if int(i * 1.08) - i == A and int(i * 1.1) - i == B:
        print(i)
        exit()

print(-1)

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

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

print(-1)

Solution (Python):
import sys
import math
sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

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


if __name__ == '__main__':
    resolve()

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

    ax,bx = 0,0
    from math import floor
    
    for i in range(1,1251):
        ax = floor(i*0.08)
        bx = floor(i*0.1)
        if ax == a and bx == b:
            print(i)
            return 0
    print(-1) 

if __name__ == '__main__':
    main()

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b = inpl()
res = -1
for i in range(10**6):
    if int(i*0.08) == a and int(i*0.1) == b:
        res = i
        break
print(res)

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

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

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

A = s[0]
B = s[1]
s = -1

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

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

n = (100/8) * 100
for i in range(int(n)):
    if int(i*0.08) == A and i//10 == B:
        print(i)
        exit()
print(-1)

Solution (Python):
import math
def main():
    A,B = map(int, input().split())
    
    min1 = math.ceil(A*100/8)
    max1 = math.ceil((A+1)*100/8)-1
    min2 = math.ceil(B*100/10)
    max2 = math.ceil((B+1)*100/10)-1
    if min1<=min2 and min2<=max1:
        ans = min2
    elif min2<=min1 and min1<=max2:
        ans = min1
    else:
        ans = -1
    print(ans)


main()

Solution (Python):
from math import floor
from sys import exit
A, B = map(int, input().split())
for i in range(2000):
  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())
ami,ama = A/0.08,(A+1)/0.08
bmi,bma = B/0.1,(B+1)/0.1

ans = 0
flag = False
for x in range(1,1200):
    if ami<=x<ama and bmi<=x<bma:
        ans = x
        flag = True
        break
if flag:
    print(ans)
else:
    print("-1")

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

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

Solution (Python):
def main():
    a, b = list(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)

if __name__ == '__main__':
    main()

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

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

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

ans = 0
a = A // 0.08 + 1
b = B // 0.1 + 1
c = max(a, b)
if int(c * 0.08) == A and int(c * 0.1) == B:
    ans = int(c)
else:
    ans = "-1"
print(ans)

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

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

for i in range(1,10**4+1):
    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())
minXB = B * 10
maxXB = B * 10 + 9
for X in range(minXB, maxXB):
    a_ = int(X * 0.08)

    if a_ == A:
        print(X)
        break
else:
    print(-1)

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
import copy
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

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

A, B = getNM()
ans = -1
for i in range(1, 2000):
    optA = math.floor(i * 0.08)
    optB = math.floor(i * 0.1)
    if optA == A and optB == B:
        ans = i
        break
print(ans)

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

Solution (Python):
import math

List = list(map(int, input().split()))

min8 = math.ceil(List[0]/0.08)
max8 = math.floor((List[0]+1)/0.08) - 1

min10 = math.ceil(List[1]/0.1)
max10 = math.floor((List[1]+1)/0.1) - 1

if max8 < min10 or max10 < min8:
    print('-1')
elif min8 <= min10:
    print(min10)
elif min10 <= min8:
    print(min8)

Solution (Python):
a,b = list(map(int,input().split()))
x = list(range(int(a//0.08+1), int((a+1)//0.08+1)))
y = list(range(int(b//0.1+1), int((b+1)//0.1+1)))
z = list(set(x) & set(y))
if not z:
  print(-1)
else:
    print(min(z))

Solution (Python):
import math
A,B = list(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)
        exit()
print(-1)

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

A1 = math.ceil((A*100)/8)
A2 = 0
if ((A+1)*100)%8 == 0:
  A2 = (((A+1)*100)//8)-1
else:
  A2 = ((A+1)*100)//8

B1 = B*10
B2 = ((B+1)*10)-1

if A1 <= B1:
    if B1 > A2:
      print(-1)
      exit()
    else:
      print(B1)

else:
    if A1 > B2:
      print(-1)
      exit()
    else:
      print(A1)
      exit()

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.1) == b:
        print(i)
        sys.exit()
print(-1)

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


res = -1


for x in range(0,1010):
    if floor(x*0.08) == A and floor(x*0.1) == B:
        res = x
        break

print(res)

Solution (Python):
import math

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

x_min = math.ceil(a / 0.08)
x_sup = math.ceil((a+1) / 0.08) 
y_min = math.ceil(b / 0.1)
y_sup  = math.ceil((b+1) / 0.1) 

u = set(range(x_min, x_sup))
v = set(range(y_min, y_sup))


w = u & v

s = 0

if len(w) == 0:
    s = -1
else:
    s = min(w)

print(s)

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

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

print(ans)

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

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

Solution (Python):
A,B = map(int,input().split())
if A % 2 == 1:
    a1,a2 = int(A*12.5)+1, A*12.5+12.5
else:
    a1,a2 = int(A*12.5),int(A*12.5+12.5)
b1,b2 = B*10,B*10+10

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

Solution (Python):
import math

A,B = map(int,input().split())
anser = 0
for i in range(1, 1100):
    if math.floor(i * 0.08) == A:
        if math.floor(i * 0.1) == B:
            anser = i
            break
    else:
        anser = -1

print(anser)

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

def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x == a) and (y == b)

ans = -1
for n in range(20000):
    if test(n):
        ans = n
        break
print(ans)

Solution (Python):
a,b=map(int,input().split())
import math
al=(a/0.08)
bl=(b/0.10)
ah=(a+1)/0.08
bh=(b+1)/0.10


if ah<=bl or bh<=al:
  print(-1)
  exit()
print(math.ceil(max(al,bl)))

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
A,B = map(int,read().split())
 
def test(n):
    x = n * 8 // 100
    y = n * 10 // 100
    return (x == A) and (y == B)
 
answer = -1
for n in range(20000):
    if test(n):
        answer = n
        break
print(answer)

Solution (Python):

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



flag=False
import math
for price in range(1,1001):
    if math.floor(price*0.08)==a and math.floor(price*0.1)==b:
        flag=True
        break

if flag:
    print(price)
else:
    print(-1)

Solution (Python):
from sys import stdin, setrecursionlimit
from math import ceil


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

    set_a = set(range(ceil(a / 0.08), ceil((a + 1) / 0.08)))
    set_b = set(range(ceil(b / 0.1), ceil((b + 1) / 0.1)))

    ans = sorted(list(set_a & set_b))

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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()