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())
m=100*a
n=80*b
l=min(100*(a+1)/8,80*(b+1)/8)
r=max(m,n)
def aprint(num):
    if l<=num:
        print(-1)
    else:
        print(num)
if (r/8)//1==r/8:
    aprint(r//8)
else:
    aprint(int(r//8)+1)

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

x_mina = (A/0.08)
x_maxa = (A+1)/0.08

if x_mina > (int)(x_mina):
  x_mina = (int)(x_mina)+1
else:
   x_mina = (int)(x_mina)
    
if x_maxa > (int)(x_maxa):
  x_maxa = (int)(x_maxa)
else:
  x_maxa = (int)(x_maxa-1)

x_minb = B/0.1
x_maxb = (B+1)/0.1

ans = -1

for i in range(x_mina,x_maxa+1):
  if i >= x_minb and i<x_maxb:
    ans = i
    break

print(ans)

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

import math
a_min=math.ceil(a/0.08)
a_max=math.ceil((a+1)/0.08)-1
b_min=math.ceil(b/0.1)
b_max=math.ceil((b+1)/0.1)-1

if a_max<b_min or b_max<a_min:
    ans=-1
else:
    ans=max(a_min,b_min)
print(ans)

Solution (Python):
A,B=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):
a,b = map(int,input().split())
al = []
bl = []
import math
ans = -1
for i in range(1,1251):
    if math.floor(i*0.08) == a:
        if math.floor(i*0.1) == b:
            ans = i
            break
print(ans)

Solution (Python):





import numpy as np
def f(a, b):
    x = np.arange(1, 1001)
    xa = np.floor(x*0.08)
    xb = np.floor(x*0.10)
    for i, value in enumerate(x):
        if xa[i] == a and xb[i] == b:
            print(value)
            break
    else:
        print(-1)

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

Solution (Python):
import math

a, b = map(int, input().split())
 
if math.ceil(a*100/8) <= math.ceil(b*100/10):
    if math.floor(b*100/10) < math.floor((a+1)*100/8):
        print(math.ceil(b*100/10))
    else:
        print(-1)
else:
    if math.floor(a*100/8) < math.floor((b+1)*100/10):
        print(math.ceil(a*100/8))
    else:
        print(-1)

Solution (Python):
import sys
 
a,b = map(int,input().split())
low = int(min(a//0.08,b//0.1))
high = int(max((a+1)//0.08,(b+1)//0.1))
for i in range(low,high+1):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    sys.exit()
print(-1)

Solution (Python):

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

print(ans)

Solution (Python):
import math
a,b=map(int,input().split())
tempa1=math.ceil(a/0.08)
tempa2=math.ceil((a+1)/0.08)-1
tempb1=math.ceil(b/0.1)
tempb2=int((b+1)/0.1)-1
if tempa1>tempb2 or tempa2<tempb1:
  print(-1)
else:
  print(max(tempa1,tempb1))

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

for i in range(1,100000):
    A = int(i*0.08)
    B = int(i*0.10)
    if A == a and B == b:
        print(i)
        exit()

print(-1)

Solution (Python):
import sys
from io import StringIO
import unittest


def resolve():
    A, B = [int(i) for i in input().split()]
    mina = int(-(-min(A / 0.08, B / 0.1) // 1))
    while int(mina * 0.08) == A or int(mina * 0.1) == B:
        if int(mina * 0.08) == A and int(mina * 0.1) == B:
            print(mina)
            return
        mina += 1
    else:
        print(-1)


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 2"""
        output = """25"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """8 10"""
        output = """100"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """19 99"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """25 32"""
        output = """320"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

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

print(found)

Solution (Python):
A, B = map(int, input().split())
for i in range(1000 * max(A, B)):
    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())

isok = False
for i in range(1,2000):
    n1 = i * 0.08
    n2 = i * 0.1
    n1 = n1//1
    n2 = n2//1
    
    if(n1==A and n2==B):
        print(i)
        isok=True
        break

if(not isok):
    print(-1)

Solution (Python):
a,b=map(float,input().split())
 
import math 
 
x=a//0.08 
 

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

Solution (Python):
import math
a,b = map(int, input().split())
price = int(max(math.ceil(a/0.08), math.ceil(b/0.1)))
ans = -1
while int(price*0.08) >= a and int(price*0.1) >= b:
  if int(price*0.08) == a and int(price*0.1) == b:
    ans = price
  price -= 1

print(ans)

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

Solution (Python):
A, B = map(int, input().split())
f = False
ans = 0
n = A * 100 // 8
m = (A + 1) * 100 // 8
for i in range(n, m + 1):
  if i * 8 // 100 == A and i // 10 == B:
    f = True
    ans = i
    break
print(ans if f else -1)

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

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

Solution (Python):
a, b = list(map(int, input().split()))
if a % 2 == 0:
    c = [int(a * 12.5), int((a + 1) * 12.5)]
else:
    c = [int(a * 12.5) + 1, int((a + 1) * 12.5) - 1]
d = [b * 10, b * 10 + 9]
if c[1] < d[0] or d[1] < c[0]:
    print(-1)
else:
    print(max(c[0], d[0]))

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

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

x_s = math.ceil(a /0.08)
y_s = math.ceil(b/0.10)
x = x_s
y = y_s
while math.floor(x*0.08) <= a:
    x+=1

while math.floor(y*0.10) <= b:
    y+=1


for i in range(x_s,x):
    for j in range(y_s,y):
        if i == j:
            print(i)
            quit()

print(-1)

Solution (Python):

class abc_158:
    
    def __init__(self):
        pass
    
    def A(self):
        S=input()
        if "BA" in S or "AB" in S:print("Yes")
        else:print("No")
    
    def B(self):
        NAB=list(map(int,input().split()))
        tail = NAB[0]%(NAB[1]+NAB[2]) if NAB[0]%(NAB[1]+NAB[2])<NAB[1] else NAB[1]
        ans=((NAB[0]/(NAB[1]+NAB[2]))*NAB[1])+tail
        print(int(ans))
            
    def C(self):
        AB=list(map(int,input().split()))
        ans=-1
        
        
        for i in range(1,1001):
            if AB[0]==int(i*0.08) and AB[1]==int(i*0.1):
                ans=i
                break
            else:continue
        print(ans)
            
    def D(self):
        pass
        
    def E(self):
        pass
    
    def F(self):
        pass
    
    
if __name__=='__main__':
    obj=abc_158()
    obj.C()

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

flag=1
for i in range(1100):
    if  i*8//100 == a and i//10 ==b:
        print(i)
        flag=0
        break

if flag:
    print(-1)

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

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

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

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

Solution (Python):
a,b=map(int,input().split())
res=-1
for i in range(1010):
    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())
for i in range(1, 10000):
    cent = i / 100
    if int(cent * 8) == A and int(cent * 10) == B:
        print(i)
        break
else:
    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.1)
 if tax1==a and tax2==b:
   ans=i
print(ans)

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

for i in range(1001):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit(0)
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)
        break;

    if i == 1009:
        print(-1)

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

ans = -1
for price in range(1, 1500):
    a = int(price * 0.08)
    b = int(price * 0.1)
    if a == A and b == B:
        ans = price 
        break

print(ans)

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

Solution (Python):
import sys

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

for i in range(13, 1010):
    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(" "))
p = []
q = []

for i in range(int(((a/8)*100)//1), int((((a+1)/8)*100)//1+1)):
  if i >= (a/8)*100 and i < ((a+1)/8)*100:
    p.append(i)
    
for i in range((b*10), (b+1)*10):
    q.append(i)

pq = list(set(p) & set(q))
if pq == []:
  print("-1")
else:
  print(min(pq))

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

from math import floor
def judge(p):
    return floor(p*0.08)==a and floor(p*0.10)==b

res = [p for p in range(10000) if judge(p)]

if res: print(min(res))
else: print(-1)

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

x = A * 100 // 8
flag = False

for i in range(13):
  if (x+i) * 8 // 100 == A and (x+i) // 10 == B:
    print(x+i)
    flag = True
    break

if flag == False:
  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)
        break
else:
    print(-1)

Solution (Python):
from math import floor

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

ans = 10000

for i in range(10000):
    if floor(i*0.08) == A and floor(i*0.10) == B:
        print(i)
        exit()

print(-1)

Solution (Python):
from math import floor

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

ans = 10000

for i in range(10000):
    if floor(i*0.08) == A and floor(i*0.10) == B:
        ans = min(ans, i)

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

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

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

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

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

for i in range(1,10000):
    if i*0.08//1==A:
        if i*0.1//1==B:
            Ans=i
            break

print(Ans)

Solution (Python):
import sys

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

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

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

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

m = -((-a*25)//2)
M = -(-(a+1)*25)//2


def check(x, b):
    ans = True
    if x < 10*b or 10*(b+1) <= x:
        ans = False
    return ans


ans = -1
for x in range(m, M):
    if(check(x, b)):
        ans = x
        break

print(ans)

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

Solution (Python):
import math
A,B=map(int,input().split())
Ra,Rb = math.ceil(A/0.08), math.ceil(B/0.1)
if Ra == Rb:
  print(Ra)
  exit()
if Ra < Rb:
  if math.floor(Rb*0.08) == A:
    print(Rb)
  else:
    print(-1)
  exit()
else:
  if math.floor(Ra*0.1) == B:
    print(Ra)
  else:
    print(-1)
  exit()
print(-1)

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

for i in range(1,1300):
    ans = i
    aa = int(ans * 0.08)
    bb = int(ans * 0.1)
    if a == aa and b == bb:
        break

if ans < 1299:
    print(str(ans))
else:
    print('-1')

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

flag=False
for x in range(1,1263):
  if int(x*0.08)==a and int(x*0.10)==b:
    print (x)
    flag=True
    break
if flag==False:
  print(-1)

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

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

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

print('-1')

Solution (Python):
import sys

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

Solution (Python):
a,b=map(int,input().split())
if a>b:
    print(-1)
else:
    p=a/0.08
    q=(a+1)/0.08
    r=b/0.1
    s=(b+1)/0.1
    if q<=r or s<=p:
        print(-1)
    else:
        if r<=p and q<=s:
            if p%1==0:
                print(int(p))
            else:
                print(int(p//1+1))
        elif p<=r and s<=q:
            if r%1==0:
                print(int(r))
            else:
                print(int(r//1+1))
        elif p<=r and q<=s:
            if r%1==0:
                print(int(r))
            else:
                if r//1+1<=q:
                    print(int(r//1+1))
                else:
                    print(-1)
        elif r<=p and s<=q:
            if p%1==0:
                print(int(p))
            else:
                if p//1+1<=s:
                    print(int(p//1+1))
                else:
                    print(-1)

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

Solution (Python):
a,b  =map(int,input().split())
c = b*10
lis = []
d = range(c,c+10)
l = list(d)
for j in l:
    if int(j*0.08)==a:
        lis.append(j)

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

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

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

Solution (Python):

a, b = map(int, input().split())
mn = max(100 * a, 80 * b)
mx = min(100 * a + 99, 80 * b + 72)
print((mn + 7) // 8 if mn <= mx else -1)

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

x = a * 100 / 8
if int(x) < x:
    x = int(x)+1
else:
    x = int(x)
y = b * 100 / 10
if int(y) < y:
    y = int(y)+1
else:
    y = int(y)

while x * 10 // 100 < b and x * 8 // 100 == a:
    x += 1
    
if x * 10 // 100 == b and x * 8 // 100 == a:
    print(x)
else:
    print(-1)

Solution (Python):
import math
a, b = map(int, input().split(" "))
x_min = a / 0.08
x_max = (a + 1) / 0.08
y_min = b / 0.10
y_max = (b + 1) / 0.10


lower = math.ceil(max([x_min, y_min]))
upper = math.floor(min([x_max, y_max]))
if lower < upper:
    print(lower)
else:
    print("-1")

Solution (Python):

a, b = map(int, input().split())
for i in range(10 ** 5):
    if i * 8 // 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(1001):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        break
else:print(-1)

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

for i in range(1001):
    if i*0.08//1==a and i*0.10//1==b :
        print(i)
        exit()
print(-1)

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
mi8 = -(-A*25//2)
ma8 = -(-(A+1)*25//2)
mi10 = -(-B*10)
ma10 = -(-(B+1)*10)
mi = max(mi8, mi10)
ma = min(ma8, ma10)
if mi >= ma:
    answer = -1
else:
    answer = mi

print(answer)

Solution (Python):
from math import floor

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

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

print(-1)

Solution (Python):
from math import floor

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

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

count = 0
for x in range(1, 10010):
    if A/0.08 <= x and B/0.1 <= x and x < (A+1)/0.08 and x < (B+1)/0.1:
        print(x)
        count += 1
        break

if count == 0:
    print("-1")

Solution (Python):
import sys

A, B = list(map(int, input().split()))
a = int(A/0.08)
b = int(B/0.1)

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

a -= 1
b += 1

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

Solution (Python):
list = []
A,B = map(int ,input().split())
for i in range(13,10001):
    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())

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

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
for x in range(1, 10001):
    if x * 8 // 100 == A and x * 10 // 100 == B:
        print(x); exit()

print(-1)

Solution (Python):



import math

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

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

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

q = 10*b
r = -1
while(q/10 == b):
	if int(q *0.08) == a:
		r = q
		break
	q+=1
print r

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

for i in range(0, 1250+1):

    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit()
print(-1)

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

ans = -1
for x in range(10000, 0, -1):
    ta, tb = x*8//100, x*10//100
    if a == ta and b == tb:
        ans = x

print(ans)

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import math
a,b = LI()
tax8 = [i for i in range(math.ceil(100/8*a), int(100/8*(a+1)))]
tax10 = [i for i in range(math.ceil(100/10*b), int(100/10*(b+1)))]

c = max(tax8[0], tax10[0])
if c in tax8 and c in tax10:
    print(c)
else:
    print(-1)

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

import math
x = math.ceil(A / 0.08)


y = math.ceil(B / 0.1)


if x == y:
    print(int(x))
    exit()

if y < x:

    while y < x:
        y += 1
        z = y * 0.1
    if z >= B + 1:
        print(-1)
        exit()
    else:
        print(int(x))
        exit()

if y > x:

    while y > x:
        x += 1
        z = x * 0.08
    if z >= A + 1:
        print(-1)
        exit()
    else:
        print(int(y))
        exit()

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        a,b=map(int, input().split())
        for i in range(13,1250):
            if (i*8)//100==a and (i*10)//100==b:
                return i
        return -1
    print(main())
resolve()

Solution (Python):
def solve(A, B):
    for i in range(1001):
        if int(i * 0.08) == A and int(i * 0.10) == B:
            return i

    return -1


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

Solution (Python):
import sys
import math
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        a,b=map(int, input().split())
        for i in range(13,1250):
            if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
                return i
        return -1
    print(main())
resolve()

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

Solution (Python):

"""
Created on Thu May  7 01:35:41 2020

@author: shinba
"""

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

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

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

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

Solution (Python):
import math

A, B = map(int, input().split())
A_min = math.ceil(A/0.08)
A_upper = (A+1)/0.08
if (math.floor(A_upper) == A_upper) and (math.ceil(A_upper) == A_upper):
    A_max = math.floor(A_upper-1)
else:
    A_max = math.floor(A_upper)
    
B_min = math.ceil(B/0.1)
B_upper = (B+1)/0.1
if (math.floor(B_upper) == B_upper) and (math.ceil(B_upper) == B_upper):
    B_max = math.floor(B_upper-1)
else:
    B_max = math.floor(B_upper)

if (A_max < B_min) or (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(1001):
    chk_a = int(i * 0.08)
    chk_b = int(i * 0.10)
    if chk_a == a and chk_b == b:
        print(i)
        exit()
print(-1)

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

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

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


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

    for i in range(10000):
        tmp_8 = math.floor(i * 0.08)
        tmp_10 = math.floor(i * 0.1)

        if (tmp_8 > 0 and tmp_10 > 0 and tmp_8 == A and tmp_10 == B):
            print(i)
            return

    print(-1)


resolve()

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

Solution (Python):
import sys
a,b=map(int,input().split())
i=0
while True:
    kouho=10*b+i
    if kouho//10 > b:
        print("-1")
        sys.exit()

    if int(kouho*0.08) == a:
        print(kouho)
        sys.exit()
    i+=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):
import math
import sys
A, B = map(int, input().split())

Xmin = math.ceil(A / 0.08)
Xmax = (A + 1) / 0.08
Ymin = math.ceil(B / 0.1)
Ymax = (B + 1) / 0.1

if (Xmin > Ymin):
    if (Xmin < Ymax):
        print(Xmin)
        sys.exit(0)
else:
    if (Ymin < Xmax):
        print(Ymin)
        sys.exit(0)
print("-1")

Solution (Python):
import math
import sys

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

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

print(-1)

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

import math

X_MIN_FROM_A = math.ceil(A / 0.08)
X_MAX_FROM_A = math.ceil((A + 1) / 0.08)

ans_set_from_a = set(range(X_MIN_FROM_A, X_MAX_FROM_A))

X_MIN_FROM_B = math.ceil(B / 0.10)
X_MAX_FROM_B = math.ceil((B + 1) / 0.10)

ans_set_from_b = set(range(X_MIN_FROM_B, X_MAX_FROM_B))

ans_set = ans_set_from_a & ans_set_from_b

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

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

Solution (Python):
a,b=map(int,input().split())
k=[]
o=[]
p=[]
for i in range(1,5000):
    if int(i*0.08)==a:
        k.append(i)
for j in range(1,5000):
    if int(j*0.1)==b:
        o.append(j)
for t in range(len(k)):
    for u in range(len(o)):
        if k[t]==o[u]:
            p.append(k[t])
if p==[]:
    print(-1)
else:
    print(min(p))

Solution (Python):
tax1, tax2 = map(int,input().split())

def _tax(tax,rate):
  return (100*tax)/rate, (100*(tax+1))/rate

tax1_m, tax1_u = _tax(tax1, 8)
tax2_m, tax2_u = _tax(tax2, 10)

import math
if tax1_m < tax2_u and tax2_m < tax1_u:
  print(math.ceil(max(tax2_m, tax1_m)))
else:
  print(-1)

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

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

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

N_list = [i for i in range(1, 1251)]
for i in N_list:
  if int(0.08*i) == A and int(0.1*i) == B:
    print(i)
    exit()
print(-1)

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

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

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

a = int(A // 0.08) + 1
b = int(B // 0.1) + 1

ab = []
ab.append(min(a, b))
ab.append(max(a, b))

for i in ab:
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        exit(0)

print('-1')

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1
def II(): return int(input())

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

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

from math import floor

def solve():
    a, b = MI()

    for i in range(10000):
        x = floor(i * 0.08)
        y = floor(i * 0.1)
        if x == a and y == b:
            print(i)
            return
    print(-1)


if __name__ == '__main__':
    solve()

Solution (Python):
A, B = [int(_) for _ in input().split()]
for x in range(1, 2000):
    if int(x * 0.08) == A and int(x * 0.1) == B:
        print(x)
        break
else:
    print(-1)

Solution (Python):
import math

A,B = (int(x) for x in input().split())
result = False
y = math.ceil(A * 12.5)
z = math.floor((A+1)*12.5)


for h in range(y,z):
    
    if result == True:
        break

    for i in range(B*10 ,(B+1)*10):
       
        if i == h:
            result = True
            break
       
if result == True:
    print(i)
else:
    print(-1)

Solution (Python):

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

c =0 
for n in range(0,10000):
    taxa = int(n*8/100)
    taxb = int(n*10/100)
    if a == taxa and b == taxb:
        print(n)
        break
    else:
        c += 1
if c > 9999:
    print(-1)