Problem:
 Score : 300 points    Problem Statement Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)  Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.  If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print -1 .      Constraints  1 \leq A \leq B \leq 100  A and B are integers.         Input Input is given from Standard Input in the following format:  A  B       Output If there is a price that satisfies the condition, print an integer representing the lowest such price; otherwise, print -1 .        Sample Input 1 2 2      Sample Output 1 25  If the price of a product before tax is 25 yen, the amount of consumption tax levied on it is:   When the consumption tax rate is 8 percent: \lfloor 25 \times 0.08 \rfloor = \lfloor 2 \rfloor = 2 yen.  When the consumption tax rate is 10 percent: \lfloor 25 \times 0.1 \rfloor = \lfloor 2.5 \rfloor = 2 yen.   Thus, the price of 25 yen satisfies the condition. There are other possible prices, such as 26 yen, but print the minimum such price, 25 .       Sample Input 2 8 10      Sample Output 2 100  If the price of a product before tax is 100 yen, the amount of consumption tax levied on it is:   When the consumption tax rate is 8 percent: \lfloor 100 \times 0.08 \rfloor = 8 yen.  When the consumption tax rate is 10 percent: \lfloor 100 \times 0.1 \rfloor = 10 yen.        Sample Input 3 19 99      Sample Output 3 -1  There is no price before tax satisfying this condition, so print -1 .

Solution (Python):



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

min_price = -1

for price in range(10000):
    if int(price * 0.08) == A and int(price * 0.10) == B:
        min_price = price
        break

print(min_price)

Solution (Python):


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

    N = (b + 1) * 10
    ans = -1

    for i in range(N):
        if int(i * 0.08) == a and int(i * 0.1) == b:
            ans = i
            break

    print(ans)

if __name__ == "__main__":
    main()

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

ans = 0
while True:
    ans += 1
    if floor(ans * 0.08) == a and floor(ans * 0.1) == b:
        print(ans)
        exit()
    elif floor(ans * 0.08) > a and floor(ans * 0.1) > b:
        break
print('-1')

Solution (Python):
A, B = map(int,input().split())
left = max(12.5*A,10*B)
right = min(12.5*(A+1),10*(B+1))
LEFT = int(left)
if left != LEFT:
    LEFT += 1
RIGHT = int(right)
if right == RIGHT:
    RIGHT -= 1
if LEFT <= RIGHT:
    print(LEFT)
else:
    print(-1)

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

def ok(x):
    return int(x * 0.08) == A and int(x * 0.10) == B 
l = list(filter(ok, range(1, 1001)))
if l:
    print(min(l))
else:
    print(-1)

Solution (Python):



from math import floor

def main():
  a, b = map(int, input().strip().split())
  for x in range(10**4+1):
    if floor(x * 0.08) == a and floor(x * 0.10) == b:
      print(x)
      return
  print(-1)

if __name__=='__main__':
  main()

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

ans=float("inf")
for x in range(1500):
    if x*8/100==A and x*10/100==B:
        ans=min(ans,x)

if ans==float("inf"):
    print -1
else:
    print ans

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




flag = False
for i in range(1, 12501):
	if (i*8)//100 == a and i//10 == b:
		flag = True
		ans = i
	if flag:
		print(ans)
		exit(0)
print(-1)

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    
    
    A, B = [int(x) for x in sys.stdin.readline().split()]  
    

    
    
    
    

    logger.debug('{}'.format([]))

    for i in range(0, 1001):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            print(i)
            return

    print(-1)


if __name__ == "__main__":
    resolve()





import sys
from io import StringIO
import unittest


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)

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

for x in range(1,100001):
    if int(x * 0.08) == a and int(x * 0.10) == b:
        print(x)
        break
else:
    print(-1)

Solution (Python):
import math

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

for i in range(1, 10001):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        flag = False
        break

if flag:
    print(-1)

Solution (Python):


def solve(A, B):
    a = A / 0.08
    b = B / 0.10
    c = int(max(a, b)) + 1
    answer = -1
    while int(c * 0.08) == A and int(c * 0.10) == B:
        answer = c
        c -= 1
    return answer


def main():
    A, B = [int(n) for n in input().split()]
    print(solve(A, B))


if __name__ == '__main__':
    main()

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

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

print(-1)

Solution (Python):
A, B = list(map(int, input().split()))
min_ = max(A/0.08, B/0.1)
max_ = min(int((A+1)/0.08),int((B+1)/0.1))

if min_%1!=0:
    min_ = int(min_)+1
else:
    min_ = int(min_)

if min_>=max_:
    print(-1)
else:
    print(min_)

Solution (Python):


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

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

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

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

Solution (Python):
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]



def A():
    S = input()
    if S == 'AAA' or S == 'BBB':
        print('No')
    else:
        print('Yes')
    return



def B():
    N, A, B = LI()
    ans = N // (A + B) * A + min(N % (A + B), A)
    print(ans)
    return



def C():
    A, B = LI()
    for i in range(1, 1001):
        if i * 8 // 100 == A and i * 10 // 100 == B:
            print(i)
            return
    print(-1)
    return



def D():
    return



def E():
    return



def F():
    return



if __name__ == "__main__":
    C()

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

Solution (Python):
from sys import stdin
a,b = map(int,stdin.readline().rstrip().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):
a, b = map(int, input().split())
for i in range(1, 1001):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        exit()
print(-1)

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

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

print(-1)

Solution (Python):
import sys

stdin = sys.stdin

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

eps = 10**-7
a,b = nm()
for i in range(10000):
    if int(i*.08 + eps) == a and int(i*.1 + eps) == b:
        print(i); break
else:
    print(-1)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





a,b=mii()

for i in range(1,10001):
    c=floor(i*0.08)
    d=floor(i*0.10)

    if c==a and d==b:
        print(i)
        exit()
print(-1)

Solution (Python):
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

a,b = miinps()

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

Solution (Python):
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

A, B = MAP()

ans = -1
for i in range(1, 1250):
    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())
n=1
while True:
  aa=int(n*0.08)
  bb=int(n*0.1)
  if a==aa and b==bb:
    print(n)
    exit()
  elif aa>a and bb>b:
    print(-1)
    exit()
  n+=1

Solution (Python):
def c_tax_increase():
    A, B = [int(i) for i in input().split()]
    for k in range(1, 10**6):
        t1 = 8 * k // 100
        t2 = k // 10
        if t1 > 0 and t2 > 0 and t1 == A and t2 == B:
            return k
    return -1

print(c_tax_increase())

Solution (Python):
a,b = map(int,input().split())
p = 1
while True:
    temp1 = int(p * 0.08)
    temp2 = int(p * 0.1)
    if temp1==a and temp2==b:
        print(p)
        break
    p+=1
    if p>1000000:
        print(-1)
        break

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

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

for i in range(10 ** 6):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        sys.exit()
print(-1)

Solution (Python):



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

A,B = input_multiple_number()

for i in range(10000):
    price = i+1
    eight = int(price * 0.08)
    ten = int(price * 0.1)
    if eight == A and ten == B:
        if(A > 100 or B > 100):
            print(-1)
            exit(0)
        print(price)
        exit(0)

print(-1)

Solution (Python):
import math

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

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

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

ans=-1
for i in range(2000):
    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())
L=[]
for i in range (10001):
	if int(i*0.08)==A and int(i*0.1)==B:
		L.append(i)
if L==[]:
	print(-1)
else:
	print(min(L))

Solution (Python):
import math
a, b = [ int(v) for v in input().split() ]
ans = -1
for i in range(1, 10001):
    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())
for i in range(1,1001):
    if int(i*0.08)==a and int(i*0.10)==b:
        print(i)
        exit()
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):
A, B = list(map(int, input().split()))


ans = None
for i in range(100000):
    a = int(i * 0.08)
    b = int(i * 0.1)
    if a == A and b == B:
        ans = i
        break

if ans is None:
    print(-1)
else:
    print(ans)

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

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

    for i in range(1, 1300):
        x1 = int(i * 0.08)
        x2 = int(i * 0.1)

        if x1 == A and x2 == B:
            print(i)
            exit()

    print(-1)


if __name__ == "__main__":
    main()

Solution (Python):
A,B=list(map(int,input().split()))
x1=int(A/0.08)
x2=int(B/0.1)
poss=[]
for x in range(min(0,x1-10),x1+11):
    poss.append(x)
for x in range(min(0,x2-10),x2+11):
    poss.append(x)
poss=sorted(poss)

for p in poss:
    if int(p*0.08)==A and int(p*0.1)==B:
        print(p)
        exit()
print(-1)

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

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

resolve()

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

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

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

x1 = a / 0.08
x2 = b / 0.1

ans = -1
zeinuki = int(min(x1,x2))
while zeinuki < max(x1,x2)+1:
  if math.floor(zeinuki * 0.08) == a and math.floor(zeinuki * 0.1) == b:
    ans = zeinuki
    break
  zeinuki += 1

print(int(ans))

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

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

A_TAX = 0.08
B_TAX = 0.10

bl = 0
for i in range(0,10000):
	if int(i*A_TAX) == A and int(i*B_TAX) == B:
		bl = 1
		print(i)
		break

if bl == 0:
	print(-1)

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

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




ans = -1
for i in range(1, 1010):
    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())
ans = 0
for i in range(20000):
    if (i * 0.08) // 1 != A:
        continue

    if (i * 0.1) // 1 != B:
        continue

    print(i)
    ans = 1
    break

if ans == 0:
    print(-1)

Solution (Python):
import math
import sys

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

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

print(-1)

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

priA = A * 100 // 108
priB = B * 100 // 110

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

else:
    print(-1)

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

ans = -1

for i in reversed(range(int(100 / 0.08) * 2)):
    if (int(i * 0.08) == A) and (int(i * 0.10) == B):
        ans = i

print(ans)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	A,B = inputMap()

	for i in range(1,100000000):
		tmp = int(i * 0.1)
		tmp2 = int(i * 0.08)

		

		if tmp2 == A and tmp == B:
			print(i)
			sys.exit()

	print(-1)










def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Solution (Python):
from math import ceil
inpl = lambda: list(map(int,input().split()))
A, B = inpl()
Amin = int(ceil(A * (100/8)))
Amax = int((A+1)*(100/8) - 0.1)
Bmin = int(ceil(B * (100/10)))
Bmax = int((B+1)*(100/10) - 0.1)
Tmax = min(Amax,Bmax)
Tmin = max(Amin,Bmin)
if Tmax < Tmin:
    print(-1)
else:
    print(Tmin)

Solution (Python):


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



from math import floor
for i in range(12, 1010):
    if floor(i*0.08) == a and floor(i*0.1) == b:
        print(i)
        exit()

print(-1)

Solution (Python):





def solv(A, B):
    for price in range(B*10, B*10+10):
        if (price * 8) // 100 == A:
            return price
    return -1


if __name__ == "__main__":

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

    print(ans)

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(1, 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(1,10100):
    if i*8//100==a and i//10==b:
        print(i)
        break
else:
    print(-1)

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

for i in range(1, 1011):
    a = i * 0.08
    b = i * 0.1
    if A <= a < A+1 and B <= b < B + 1:
        print(i)
        exit()

print('-1')

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

for j in range(1250):
    if int(j*0.08) == A and int(j*0.10) == B:
        print(j)
        flag = 1
        break

if flag == 0:
    print(-1)

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

ans = -1

for i in range(1011):
    _a = int(i * 0.08)
    _b = int(i * 0.1)
    if _a == a and _b == b:
        ans = i
        break
print(ans)

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

b_small = int(B * 10)
b_big = int((B+1) * 10)
flag = True
for i in range(b_small, b_big):
    if int(i * 0.08) == A:
        print(i)
        flag = False
        break

if flag:
    print('-1')

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

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

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

print(-1)

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

ans = -1
i = 1
while i < 2000:

    a = int(i * 1.08) - i
    b = int(i * 1.1) - i
    if A == a and B == b:
        ans = i
        break
    i += 1
print(ans)

Solution (Python):
import sys
a,b=map(int,input().split())
A=(a*100+8-1)//8
B=b*10
if a%2==0:
  for i in range(13):
    AA=A+i
    for j in range(10):
      BB=B+j
      if AA==BB:
        print(AA)
        sys.exit()
else:
  for i in range(12):
    AA=A+i
    for j in range(10):
      BB=B+j
      if AA==BB:
        print(AA)
        sys.exit()
print(-1)

Solution (Python):
from math import floor
import sys


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


for i in range(20000):
    if floor(i * 0.08) == A and floor(i * 0.1) == B:
        print(i)
        sys.exit()

print('-1')

Solution (Python):
import math


def submit():
    a, b = map(int, input().split())
    b_price_min, b_price_max = b * 10, (b + 1) * 10 - 1

    for b_price in range(b_price_min, b_price_max + 1):
        if math.floor(b_price * 0.08) == a:
            print(b_price)
            return

    print(-1)


if __name__ == "__main__":
    submit()

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

i = int(a / 0.08)


while (1):
    if (a == int(i*0.08) and b == int(i*0.1)):
        print(i)
        break
    if (int(i*0.08) > a):
        print(-1)
        break;
    i += 1

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

import sys

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

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

root=floor(a*100//8)

while True:
    if (a==int(floor(root*0.08)))&(b==int(floor(root*0.1))):
        ans=int(root)
        break
    else:
        if (int(floor(root*0.08))>a)|(int(floor(root*0.1))>b):
            ans=-1
            break
        root+=1
print(ans)

Solution (Python):
x,y = list(map(lambda x:int(x),input().split(" ")))
start = int(x*12.5)-1
for i in range(start,start+30):
  if int(i*.08)==x and int(i*0.1)==y:
    print(i)
    break
  if i==start+29:
    print(-1)

Solution (Python):


import sys
import math
import time

import collections
from collections import deque
import queue
import copy
import bisect


def dfs(s, prev, pre):
  val[s] += Ope[s] + prev
  for i in G[s]:
    if(i == pre):
      continue
    dfs(i, val[s], s)

def bfs(sx, sy, n):
  que = deque([[sy,sx]])
  while que:
    y,x = que.popleft()
    for i,j in D:
      if(x+i<0 or y+j<0 or x+i>W-1 or y+j>H-1):
        continue
      dist = G[y+j][x+i]
      if(G[y+j][x+i] != "X"):
        if(type(G[y+j][x+i]) is str):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        elif(dist>G[y][x]+1):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        







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

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

print(ans)

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

for i in range(10000):
  if (i*0.08)//1==A and (i*0.1)//1==B:
    print(i)
    exit()
print(-1)

Solution (Python):

import math

def solve():
    A, B = list(map(int, input().split()))
    x1 = A*(100/8)
    x2 = B*(10)
    x = min(x1, x2)

    while True:
        a = math.floor(x*0.08)
        b = math.floor(x*0.1)
        if a>A and b>B:
            print(-1)
            return

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

if __name__ == "__main__":
    solve()

Solution (Python):
i=list(map(int, input().split()))
a=i[0]
b=i[1]
k=1001
for j in range (1000,0,-1):
    if int(j*0.08)==a and int(j*0.1)==b:
        k=j
if k==1001:
    print(-1)
else:
    print(k)

Solution (Python):
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

def print_l(l):
    print(' '.join(map(str, l)))

class Interval():
    def __init__(self, li):
        self.li = li
        self.n = len(li)
        self.sum_li = [li[0]]
        for i in range(1, self.n):
            self.sum_li.append(self.sum_li[i-1] + li[i])

    def sum(self, a, b=None):
        if b is None:
            return self.sum(0, a)

        res = self.sum_li[min(self.n-1, b-1)]
        if a > 0:
            res -= self.sum_li[a-1]
        return res

a,b=l_in()

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

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


x_min = min(int(a / 0.08), int(b / 0.1))
x_max = max(int((a + 1) / 0.08), int((b + 1) / 0.1))
for x in range(x_min, x_max + 1):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        print(x)
        break
else:
    print(-1)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	A,B = inputMap()

	for i in range(1,100000000):
		tmp = int(i * 0.1)
		tmp2 = int(i * 0.08)

		

		if tmp2 == A and tmp == B:
			print(i)
			sys.exit()

	print(-1)










def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Solution (Python):


import math

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

x = max(math.ceil(A*100/8), math.ceil(B*10))

if math.floor(x*0.08) != A or math.floor(x*0.1) != B:
    print(-1)
else:
    print(x)

Solution (Python):

import math
a,b = map(int,input().split())
ans = -1
for i in range(1,12500):
    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())
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(1,10101):
  if int(i*0.08)==A and int(i*0.1)==B:
    print(i)
    exit(0)
else:
  print(-1)

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

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

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

print(-1)

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

Solution (Python):
a,b=map(int,input().split())
import math
x=min(math.floor(a/0.08),math.floor(b/0.1))
y=max(math.floor((a+1)/0.08),math.floor((b+1)/0.1))
for i in range(x,y):
    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())

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

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

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

for i in range(1,1251):
    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 = (int(i) for i in input().split())

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


print(ans)