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

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

mina = 12.5 * A 
maxa = 12.5 * A + 12.5
minb = 10 * B 
maxb = 10 * B + 10

Min = int(min(mina, minb))
Max = int(max(maxa, maxb)) + 1

ans = -1
for i in range(Min, Max+2):
    if (mina <= i) and (minb <= i) and (i < maxa) and (i < maxb):
        ans = i
        break
print(ans)

Solution (Python):
import math

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

price_a_min = math.ceil(a * 12.5)
price_a_max = math.ceil((a + 1) * 12.5) - 1
price_b_min = math.ceil(b * 10)
price_b_max = math.ceil((b + 1) * 10) - 1

if price_a_min > price_b_max or price_b_min > price_a_max:
  print(-1)
else:
  print(max(price_a_min, price_b_min))

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

ans = -1
for i in range(1001):
    moneyA = int(i * 1.08)
    taxA = moneyA - i
    moneyB = int(i * 1.10)
    taxB = moneyB - i
    if A == taxA and B == taxB:
        ans = i
        break
print(ans)

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

for i in range(1,10000):
  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(2000):
    if int(i*0.08)==A and int(i*0.1)==B:
        print(i)
        exit()
print(-1)

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

for i in range(1300):
    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())
for i in range(1, 1001):
    if (i * 0.08) // 1 == A and (i * 0.1) // 1 == B:
        print(i)
        exit(0)

print(-1)

Solution (Python):
from math import floor

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

ans = 0
while ans != 100000:
    aq = floor(ans*0.08)
    bq = floor(ans*0.1)
    if (aq==a) and (bq==b):
        break
    else:
        ans+=1
if ans == 100000:
    ans = -1
print(ans)

Solution (Python):
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement, groupby
from math import sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heappushpop
import sys
stdin = sys.stdin
mod = 10**9 + 7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

a, b = na()

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

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

def main():
    for x in range(2000):
        if x * 8 // 100 == A and x * 10// 100 == B:
            print(x)
            return

    print(-1)
    return


main()

Solution (Python):
import math
import sys

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

for c in range(1, 100 * 20 + 1):
    if math.floor(c * 0.08) == A and math.floor(c * 0.1) == B:
        print(c)
        sys.exit()
else:
    print(-1)

Solution (Python):

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

mn = int(a/(0.1))-5
mx = int(b/0.08)+3

for i in range(mn,mx):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()

print(-1)

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

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, 10 ** 4):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        ans = i
        break
else:
    ans = -1

print(ans)

Solution (Python):
import math

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

Solution (Python):
import sys
import math

input = sys.stdin.readline

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

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

print(-1)

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

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

Solution (Python):
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    A, B = lr()
    for i in range(100000):
        if int(i*0.08) == A and int(i*0.1) == B:
            print(i)
            return
    print('-1')
resolve()

Solution (Python):
import sys
import math

a, b = [int(s) for s in sys.stdin.readline().strip().split()]

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

Solution (Python):
from math import ceil, floor

a, b = [int(v) for v in input().split()]
ca, cb = ceil(a / 0.08), ceil(b / 0.1)
res = max(ca, cb)
if ca != res and floor(res * 0.08) != a:
    print("-1")
elif cb != res and floor(res * 0.1) != b:
    print("-1")
else:
    print(res)

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

Solution (Python):
A,B=list(map(int,input().split()))
for i in range(100000):
  if((i*108)//100==i+A and (i*110)//100==i+B):
    print(i)
    exit()
print(-1)

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

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

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

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

import numpy as np
import sys
for i in range(1, 1251):
  if np.floor(i*0.08) == A and np.floor(i*0.1) == B:
    print(i)
    sys.exit()
  else:
    pass
  
print(-1)

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

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

if __name__ == "__main__":
    main()

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read

a,b = [int(i) for i in read().split()]


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

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

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

print(ret)

Solution (Python):
import sys
input=sys.stdin.readline
a,b=map(int,input().split())
import math
for i in range(2000):
    x=math.floor(i*0.08)
    y=math.floor(i*0.1)
    if x==a and y==b:
        print(i)
        sys.exit()
print(-1)

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

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

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

for x in range(1, 10**5):
    if x*8//100 == A and x*10//100 == B:
        print(x)
        break
else:
    print(-1)

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

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

m = -1
for n in range(100001):
    if A*100 <= 8*n < (A+1)*100 and B*100 <= 10*n < (B+1)*100:
        m = n
        break
print(m)

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

Solution (Python):
x,y=map(int,input().split())

for i in range(10**6):
    if int(i*0.08)==x and int(i*0.1)==y:
        print(i)
        exit()
print(-1)

Solution (Python):



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

    for i in range(1, 10001):
        if int(i*1.08) - i == A and int(i*1.10) - i == B:
            return i

    return -1


print(main())

Solution (Python):
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    for i in range(1, 1251):
        if i * 0.1 // 1 == b and i * 0.08 // 1 == a:
            return i
    return -1

if __name__ == '__main__':
    ans = main()
    print(ans)

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

flag=0

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

if not flag: print(-1)

Solution (Python):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(input()) 
def ifn(): return float(input()) 
def isn(): return input().split() 
def imn(): return map(int, input().split()) 
def fmn(): return map(float, input().split()) 
def iln(): return list(map(int, input().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def fln(): return list(map(float, input().split())) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 
def m_add(a,b): return (a+b) % MOD

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

A,B = imn()

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

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

n=1
while n<=10**6:
  if int(n*0.08)==a and int(n*0.1)==b:
    print(n)
    exit()
  else:
    n+=1
print(-1)

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

Solution (Python):
from math import floor

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

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

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

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

Solution (Python):
def solve(a, b):
    for i in range(1, 1001):
        res_a = int(i * 0.08)
        res_b = int(i * 0.10)
        if res_a == a and res_b == b:
            return i
    return -1


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


def test():
    assert solve(2, 2) == 25
    assert solve(8, 10) == 100
    assert solve(19, 99) == -1


if __name__ == "__main__":
    test()
    main()

Solution (Python):
def main():
    a, b = map(int, input().split())
    ans = -1
    for i in range(100000):
        x = int(i*0.08)
        y = int(i*0.10)
        if x == a and y == b:
            ans = i
            break
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
import math
import collections

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



cnt = 1
while (cnt < 2000):
    if math.floor(cnt * 0.08) == a and math.floor(cnt * 0.1) == b:
        print(cnt)
        sys.exit()
    cnt += 1

print(-1)

Solution (Python):
import math
a, b = [int(x) for x in input().split()]
def solve(a, b):
    for i in range(1, 1001):
        if a == math.floor(i * 0.08) and b == math.floor(i * 0.1):
            return i
    return -1
print(solve(a, b))

Solution (Python):
import math
A,B=map(int,input().split())
flag=0
for i in range(0,5000):
    a=i*0.08
    b=i*0.10
    if (math.floor(a)==A)and(math.floor(b)==B):
        print(i)
        flag=1
        break
if flag==0:
    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
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]


def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)


a,b = get_nums_l()

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

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

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

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    A, B = LI()

    for money in range(1, 2000):
        if int(money * 0.08) == A and int(money* 0.10) == B:
            print(money)
            return
    print(-1)
    return


main()

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

Solution (Python):
from math import floor


def main():
    a, b = map(int, input().split())
    tmp = True
    for n in range(1, 1251):
        if floor(n * 0.08) == a and floor(n * 0.1) == b:
            print(n)
            tmp = False
            break
    if tmp:
        print(-1)


if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
c=max([a/0.08,b/0.1])
c=int(c)+(c!=int(c))
if int(c*0.08)==a and int(c*0.1)==b:
    print(c)
else:
    print(-1)

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

a_ = a // 0.08
b_ = b // 0.1

ans = min(floor(a_), floor(b_))

while floor(ans * 0.08) != a or floor(ans * 0.1) != b:
    ans += 1
    if floor(ans * 0.08) > a or floor(ans * 0.1) > b:
        print('-1')
        exit()
print(ans)

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

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

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

print(ans)

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

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

x = 0
while True:
    if (x*2) // 25 == A and x//10 == B:
        print(x)
        exit()
    if (x*2) // 25 > A and x//10 > B:
        print(-1)
        exit()
    
    x += 1

Solution (Python):
import math

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

for i in range(1,10001):
    if math.floor(i * 0.08) != A:
        continue
    if math.floor(i * 0.1) != B:
        continue
    print(i)
    exit()

print(-1)

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

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

Solution (Python):
a, b = map(int, input().split())
import math
for i in range(10000):
    p = math.floor(i*0.08)
    q = math.floor(i*0.10)
    if p == a and q == b:
        print(i)
        exit()
else:
    print(-1)

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

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

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

print(-1)

Solution (Python):
import math
a,b = map(int,input().split())
a1 = math.ceil((25*a)/2)
a2 = (25*(a+1))/2
b1 = 10*b
b2 = 10*(b+1)
f = max(a1,b1)
if f < a2  and f < b2:
  print(f)
else:
  print(-1)

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 7)

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

print(ans)

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

import math
ans=0
for i in range(1,1500):
    price8 = math.floor(i*0.08)
    price10 = math.floor(i*0.10)
    if a==price8 and b==price10:
        ans=1
        break
if ans==1:
    print(i)
else:
    print(-1)

Solution (Python):
def main():
    import numpy as numpy
    import sys
    A,B=list(map(int,sys.stdin.readline().split()))
    for price in range(10001):
        if int(price*0.08)==A and int(price*0.1)==B:
            return price
    
    return -1

print(main())

Solution (Python):

"""
Created on Sun Jan 19 20:52:57 2020

@author: over-
"""


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


ans=-1
for i in range(2000):
    r=i*0.08
    if int(r) == A:
        l=i*0.1
        if int(l)==B:
            ans=i
            break

print(ans)

Solution (Python):
a,b = map(int, input().split())
ans=-1
for i in range(10000):
    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())
flag = True
for i in range(13000):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    flag = False
    break
if flag:
  print(-1)

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

def ans():

    for x in range(0, 100000):
        if A == int(x * 0.08) and B == int(x * 0.1):
            print(x)
            return
    print(-1)

ans()

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

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

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

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

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

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

Solution (Python):
import math
a,b=list(map(int,input().split()))
ans=float("inf")
for i in range(2000,0,-1):
    if math.floor(i*0.1)==b and math.floor(i*0.08)==a:
        ans=min(ans,i)
if ans==float("inf"):
    ans=-1
print(ans)

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

def f():
	for i in range(10 ** 4 + 1):
		if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
			return i
	return -1

print(f())

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

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

    for i in range(100000):
        if i * 8 // 100 == A and i // 10 == B:
            print(i)
            return
    else:
        print(-1)


if __name__ == '__main__':
    main()

Solution (Python):







import math

import sys



ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

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

    for price in range(0, 10001):
        aa = math.floor(price * 0.08)
        bb = math.floor(price * 0.10)

        if a == aa and b == bb:
            print(price)
            sys.exit()

    print(-1)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math

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

A, B = lr()
answer = -1
for x in range(1001):
    if math.floor(x * 0.08) == A and math.floor(x * 0.1) == B:
        answer = x
        break

print(answer)

Solution (Python):

import sys


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

for n in range(1,10**5):
    a = n*0.08 // 1
    b = n*0.10 // 1
    if a==A and b==B:
        print(n)
        sys.exit()

print(-1)

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

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

    print(-1)
    
if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7

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

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

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

Solution (Python):
def mi():return map(int,input().split())
def li():return list(mi())

a,b=mi()
import math
for i in range(100100):
    if math.floor(0.08*i)==a and math.floor(0.10*i)==b:
        print(i)
        exit()
        
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):
A, B = map(int, input().split())
ans = -1
i = 0
while True:
    A8 = i*0.08//1
    B10 = i*0.1//1
    if A == A8 and B == B10:
        ans = i
        break
    elif A < A8 and B < B10:
        break
    i += 1
print(ans)

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

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

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

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

print(-1)

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

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

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

for i in range(1,10**6):
    if math.floor(i*0.08) == a:
        if math.floor(i*0.10) == b:
            print(i)
            exit()
            """
    elif math.ceil(i*0.08) == a:
        if math.floor(i*0.10) == b:
            print(i)
            exit()
        elif math.ceil(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.1) == b and int(i*0.08) ==a:
    print(i)
    break
else:
  print(-1)

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

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

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

for i in range(1, 10 ** 4):
    x = int(i * 0.08)
    y = int(i * 0.1)
    if x == a and y == b:
        print(i)
        exit()
    if x > a and y > b:
        print(-1)
        exit()

print(-1)

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

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

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

x = A * 12
l = 0
while l == 0:
  if (x * 0.08) // 1 == A:
    if (x * 0.1) // 1 == B:
      print(x)
      quit()
  x += 1
  if (x * 0.08) // 1 > A:
    if (x * 0.1) // 1 > B:
      l = 1
      
print("-1")

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

Solution (Python):
from sys import exit

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

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

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

Solution (Python):

from math import floor

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

def calc(A, B):
	i = 0
	while True:
		ta = floor(i * 0.08)
		tb = floor(i * 0.10)
		if ta == A and tb == B:
			return i
		if ta > A and tb > B:
			return -1
		i += 1

print(calc(A, B))

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

def check(x):
    a = int(x * 0.08)
    b = int(x * 0.10)
    if (a == A) and (b == B):
        return True
    else:
        return False

for i in range(1, 10000):
    if check(i):
        print (i)
        exit()
print (-1)

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

Solution (Python):
A, B = [int(i) for i in input().split()]
N = 10000
ret = -1
for n in range(N):
  nA = int(n * 0.08)
  nB = int(n * 0.1)
  if A == nA and B == nB:
    ret = n
    break
print(ret)

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

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

Solution (Python):
import sys
import math

if __name__ == "__main__":
    A,B = map(float, input().split())
    for i in range(1, 2001):
        n1 = math.floor(i * 0.08)
        n2 = math.floor(i * 0.1)
        if n1 == A and n2 == B:
            print(i)
            exit()
    print(-1)

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

for i in range(100000):
    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, 2000):
    if int(i * 1.08) - i == A and int(i * 1.1) - i == B:
        print(i)
        exit()
print(-1)

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

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

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

print(-1)