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());l=max(0--a*25//2,b*10);print([-1,l][l<min(0-~a*25//2,-~b*10)])

Solution (Python):
a,b=map(int,input().split());l=max(-(-a*25//2),b*10);print([-1,l][l<min(-(~a*25//2),-~b*10)])

Solution (Python):
a,b=map(int,input().split())
l=max(-(-a*25//2),b*10)
print([-1,l][l<min(-(~a*25//2),-~b*10)])

Solution (Python):
import sys, re
import math
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7



a, b = MAP()
ans = -1

for x in range(1, a * 100):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        ans = x
        break

print(ans)

Solution (Python):
from math import floor

A, B = map(int, input().split())
ans = -1
x = 1
while True:
    a = floor(x * 0.08)
    b = floor(x * 0.10)
    if a > A and b > B:
        break
    if a == A and b == B:
        ans = x
        break
    x += 1
print(ans)

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

Solution (Python):
a,b=map(int,input().split())
from math import ceil as c
l,r=max(c(a/.08),b*10),min(c(-~a/.08),-~b*10)
print([-1,l][l<r])

Solution (Python):
A, B = list(map(int,input().split()))
list_i = []
for i in range(1100):
    if A <= i * 8 / 100 < A + 1:
        list_i.append(i)
    else:
        pass
            
        
list_j = []
for j in range(1100):
    if B <= j * 10 / 100 < B + 1:
        list_j.append(j)
    else:
        pass
            
    
s_i = set(list_i)
s_j = set(list_j)
list_w = s_j & s_i
if not list_w :
    print(-1)   
else:
     print(min(list_w))

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B = MAP()

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

Solution (Python):
a, b = map(int,input().split())
if b * 10 <= (a * 25 + 24) // 2 and -(-a * 25 // 2) < (b + 1) * 10:
    print(max(-(-a*25//2), b * 10))
else:
    print(-1)

Solution (Python):

from math import floor


def calc(a: int, b: int) -> int:
    for i in range(1, 1010):
        if floor(i * 0.08) == a and floor(i * 0.1) == b:
            return i
    return -1


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


if __name__ == "__main__":
    main()

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

def resolve():
    A, B = map(int, input().split())
    aa_min = A / 0.08
    aa_max = (A+1) / 0.08
    bb_min = B / 0.1
    bb_max = (B+1) / 0.1
    if aa_min < bb_max and bb_min < aa_max:
        print(math.ceil(max(aa_min, bb_min)))
    else:
        print('-1')

if __name__ == '__main__':
    resolve()

Solution (Python):

from math import floor

def calc(a: int, b: int) -> int:
    for i in range(1, 10001):
        if floor(i * 0.08) == a and floor(i * 0.1) == b:
            return i
    return -1


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


if __name__ == "__main__":
    main()

Solution (Python):
a = input().split(" ")
t8 = int(a[0])
t10 = int(a[1])

for i in range(13, 1001):
	b = int(i * 0.08)
	c = int(i * 0.1)
	if b == t8 and c == t10:
		print(i)
		break
	if i == 1000:
		print(-1)
		break

Solution (Python):
import math
a,b=map(int,input().split())
j=[]
for i in range(1,1001):
  if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
    j.append(i)
    print(min(j)) 
    break;
if len(j)==0:
 print(-1)

Solution (Python):
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(1001):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 1000:
        print('-1')
        break
    else:
        c += 1

Solution (Python):

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

Solution (Python):

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


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

Solution (Python):
A, B = map(int, input().split())
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):
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(10000):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 9999:
        print('-1')
        break
    else:
        c += 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):
l=list(input().split())
A=int(l[0])
B=int(l[1])
c=0
for i in range(1,100001):
  if int(i*0.08)==A and int(i*0.1)==B:
    print(i)
    c=1
    break
if c==0:
	print(-1)

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

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

for i in range(int(max(a, b)),int(min(a_, b_))+1):
    if A==int(i*.08)and B==int(i*.1):
        print(i)
        break
else:
    print(-1)

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

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

Solution (Python):

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








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

Solution (Python):
a,b=map(int,input().split());print(([i for i in range(10**6)if(i//12.5==a)*i//10==b]+[-1])[0])

Solution (Python):
taxs = input().split(" ")
 
a = int(taxs[0])
b = int(taxs[1])
 
product_min = int(a / 0.08 + 0.5)
product_max = int((a+1) / 0.08)

setflg = 0
for product in range( product_min, product_max ):
  bpred = int(product * 0.1)
  if( bpred == b ):
    print( product )
    setflg=1
    break

if setflg==0:
  print( -1 )

Solution (Python):
a,b=map(int,input().split());print(([i for i in range(10**6)if a==i//12.5and b==i//10]+[-1])[0])

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:
    print(i)
    exit()
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())
ans = -1
for x in range(1500):
    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(10**6):
  if a==int(i*.08)and b==int(i*.1):
    print(i)
    break
else:print(-1)

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

Solution (Python):
import math
a,b = map(int,input().split())
ans = 1
while True:
    if math.floor(ans*0.08) == a:
        while math.floor(ans*0.08) == a:
            if math.floor(ans*0.1) == b:
                print(ans)
                exit()
            ans+=1
        print(-1)
        exit()
    ans+=1

Solution (Python):
import sys
A,B = map(int,input().split())
sys.setrecursionlimit(2000)
def search(x):
    p = (x*0.08)//1
    q = (x*0.10)//1
    if p==A and q==B:
        print(x)
        exit()
    elif p > A and q > B:
        print(-1)
    else:
        search(x+1)
search(1)

Solution (Python):
import math
import sys

e, t = map(int, input().split())
for i in range(1010):
  if math.floor(i*0.08) == e and math.floor(i*0.1) == t:
    print(i)
    sys.exit()
print(-1)

Solution (Python):
import sys









mod = int(1e9+7)
INF = 1<<29

def main():
    a,b = map(int,input().split())
    ans = []
    x = int(min(a//0.08,b//0.1))
    y = int(max((a+1)//0.08,(b+1)//0.1))
    for i in range(x,y+1):
        if int(i*0.08)==a and int(i*0.1)==b:
            ans.append(i)
    if len(ans):
        print(min(ans))
    else:
        print(-1)
    return

if __name__=='__main__':
    main()

Solution (Python):

A, B = map(int, input().split())
for v in range(1001):
    if int(v * 0.08) == A and int(v * 0.1) == B:
        print(v)
        exit()
print(-1)

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

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

Solution (Python):
import math
a,b = map(int,input().split())
c = math.ceil(a/0.08)
d = math.ceil(b/0.1)
c = max(c,d)
e = math.floor(c*0.08)
f = math.floor(c*0.1)
if a == e and b == f:
  print(c)
else: print(-1)

Solution (Python):
import math
import sys
a,b=map(int,input().split())
a2=math.ceil(a/0.08)
a3=math.floor((a+1)/0.08)
if a2>a3:
    print("-1")
    sys.exit()
b2=math.ceil(b/0.1)
b3=math.floor((b+1)/0.1)
if b2>b3:
    print("-1")
    sys.exit()
if b2<a2:
    if a2<(b+1)/0.1:
        print(a2)
    else:
        print("-1")
if a2<b2:
    if b2<(a+1)/0.08:
        print(b2)
    else:
        print("-1")
if a2==b2:
    print(a2)

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

for i in range(10000):
  A=int(i*0.08)
  B=int(i*0.1)
  if A==a and B==b:
    print(i)
    exit()

print(-1)

Solution (Python):
from math import ceil
A, B = map(int, input().split())
min8 = A/0.08
max8 = (A+1)/0.08-1
min10 = B/0.1
max10 = (B+1)/0.1-1
if min8>max10 or min10>max8:
  print(-1)
else:
  print(max(ceil(min8),ceil(min10)))

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

for i in range(0,2000):
	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())
Xa = A * 12.5
Xb = B * 10
X = math.ceil(max(Xa,Xb))
ansA = math.floor(X * 0.08)
ansB = math.floor(X * 0.1)

if A == ansA and B == ansB:
    print(X)
else:
    print(-1)

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

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

print(ans)

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

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

print(-1)

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

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

S=max(12.5*A,10*B)

if S%1!=0:
    S=int(S)+1

if S<12.5*A+12.5 and S<10*B+10:
    print(int(S))
else:
    print("-1")

Solution (Python):
import math

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

ans = []
for i in range(10000):
    a_shouhizei = math.floor(i * 8/100)
    b_shouhizei = math.floor(i * 10/100)
    if a_shouhizei == a and b_shouhizei == b:
        ans.append(i)
if ans == []:
    print('-1')
else:
    print(min(ans))

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


main()

Solution (Python):
import math as ma
def minCharge810(a, b):
    A0 = 0
    A1 = 0
    B0 = 0
    B1 = 0

    A0 = ma.ceil(a / 0.08)
    A1 = ma.floor((a+1) / 0.08)
    B0 = ma.ceil(b / 0.1)
    B1 = ma.floor((b+1) / 0.1)

    ans1 = [i for i in range(int(A0), int(A1))]
    ans2 = [i for i in range(int(B0), int(B1))]
    ans = set(ans1) &  set(ans2)
    if ans == set():
        return '-1'
    else:
        return min(ans)
a, b = map(int, input().split())
print(minCharge810(a, b))

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

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

for i in range(1,10**3+1):
    cand_a=int(i*0.08)
    cand_b=int(i*0.1)
    if cand_a==a and cand_b==b:
        print(i)
        exit()

print(-1)

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

for i in range(1009):
    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())
x = -1
for i in range(10, 1001):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        x = i
        break
print(x)

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

Solution (Python):
a,b=map(int,input().split())
for i in range(0,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 (i*0.08)//1 == a and (i*0.1)//1 == b:
    print(i)
    quit()
print(-1)

Solution (Python):
import sys
a,b=map(int,input().split())
i=0
while i <= 10000:
    c=int(i*0.08)
    d=int(i*0.1)
    if c==a and d==b:

        print(i)
        sys.exit()
    i+=1

print(-1)

Solution (Python):
def c_tax_increase():
    A, B = [int(i) for i in input().split()]
    lower = max((25 * A + 2 - 1) // 2, 10 * B)
    upper = min(25 * (A + 1) // 2, 10 * (B + 1))
    return lower if lower < upper else -1

print(c_tax_increase())

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

p = max((25*A+1)//2,(20*B+1)//2)
if p * 2 >= min(25*(A+1), 20*(B+1)):
    p = -1

print(p)

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

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

if ans == 0 :
    ans = -1

print(ans)

Solution (Python):
def c_tax_increase():
    from math import floor, ceil
    A, B = [int(i) for i in input().split()]
    lower = ceil(max(25 * A / 2, 10 * B))
    upper = floor(min(25 * (A + 1) / 2, 10 * (B + 1)))
    return lower if lower < upper else -1

print(c_tax_increase())

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

ans_a = A // 0.08
ans_b = B // 0.10

for i in range(1, 10100):
    if A == int(0.08 * i) and B == int(0.10 * i):
        ans = i
        print(ans)
        break
if ans == 0:
    print(-1)

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b = LI()

for i in range(100000):
    if int(i * 0.08) != a:
        continue
    if int(i * 0.1) != b:
        continue
    print(i)
    quit()
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)
    exit()

print(-1)

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

ansA = 12.5
ansB = 10

for i in range(1009):
    if i//ansA == A and i//ansB == B:
        print(i)
        exit()
print(-1)

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

Solution (Python):
a, b = input().split() 
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) != a:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

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

Solution (Python):
import math
A,B = map(int,input().split())
Xa = math.ceil(A/0.08)
xa = int((A+1)/0.08)
Xb = math.ceil(B/0.1)
xb = int((B+1)/0.1)
ans = -1
for i in range(Xa,xa):
    if Xb <= i < xb:
        ans = i
        break
print(ans)

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

x = -1

xa = 0
xb = 0

a_arr = []
b_arr = []

for temp_a in range(10001):
    xa = temp_a * 0.08
    if xa // 1 == a:
        a_arr.append(temp_a)

for temp_b in range(10001):
    xb = temp_b * 0.1
    if xb // 1 == b:
        b_arr.append(temp_b)




for aa in a_arr:
    if aa in b_arr:
        print(aa)
        exit(0)

print('-1')

Solution (Python):
import math

a,b = map(lambda x: int(x), input().split())


hati_s = a/0.08
hati_l = (a+1)/0.08

ten_s = b/0.1
ten_l = (b+1)/0.1




def intersec(a_min,a_max,b_min,b_max):
    if a_min < b_min:
        if a_max < b_min:
            return [0,0]
        else:
            if a_max < b_max:
                return [b_min,a_max]
            else:
                return [b_min,b_max]
    else:
        if b_max < a_min:
            return [0,0]
        else:
            if b_max < a_max:
                return [a_min,b_max]
            else:
                return [a_min,a_max]


def min_int(pair):
    if pair == [0,0]:
        return -1
    else:
        return math.ceil(pair[0])



tmp = intersec(hati_s,hati_l,ten_s,ten_l)

if math.ceil(tmp[0]) == math.ceil(tmp[1]):
    print(-1)
else:
    tst = min_int(tmp)
    print(tst)

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

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

Solution (Python):
import math
a,b=map(int,input().split())
xa=math.ceil(a/0.08)
xb=int(b/0.1)
if int(max(xa,xb)*0.08)==a and int(max(xa,xb)*0.1)==b:
    print(max(xa,xb))
else:
    print(-1)

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
















for i in range(1, 1009, 1):
    
    x = i * 0.08
    
    x_2 = int(x)
    y = i * 0.1
    
    y_2 = int(y)
    
    
    if x_2 == a and y_2 == b:
        
    
        ans = i
        break
    else:
        ans = -1

print(ans)

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

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

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

Solution (Python):


a, b = map(int, input().split())
res = -1

for i in range(1500):
    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, 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, 20000):
  tmpa=int(i*0.08)
  tmpb=int(i*0.1)
  if a==tmpa and b==tmpb:
    print(i)
    exit()
print(-1)

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

Solution (Python):
A, B = map(int, input().split())
C = [0] * 1001
D = [0] * 1001
for i in range(80):
  C[-(-(i + 1) * 100 // 8)] += 1
for i in range(100):
  D[(i + 1) * 10] += 1
for i in range(1000):
  C[i + 1] += C[i]
  D[i + 1] += D[i]
for i in range(1, 1001):
  if C[i] == A and D[i] == B:
    print(i)
    break
else:
  print(-1)

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

c = int(a / 0.08)
d = int(b / 0.1)
if c == d:
  print(c)
  exit()

for i in range(min(c, d), 10000):
  if (a == int(i * 0.08)) & (b == int(i * 0.1)):
    print(i)
    exit()
    
print(-1)

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

Solution (Python):
import math
A,B = list(map(int, input().split()))
for i in range(1,1000+1):
  if(math.floor(i * 0.08) == A and math.floor(i * 0.10) == B):
    print(i)
    exit()
print(-1)

Solution (Python):
import math
A,B= map(int,input().split())
min_x = math.ceil(max(A/0.08,B/0.10))

max_x = (min((A+1)/8,(B+1)/10)*100)

if max_x-min_x>0:
    ans = int(min_x)
else:
    ans = -1
print(ans)

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()

for i in range(1, 2000):
    tax8 = i * 8 // 100
    tax10 = i * 10 // 100
    if tax8 == a and tax10 == b:
        print(i)
        exit()
    
print(-1)
exit()
x1 = a / 0.08
y1 = b /0.1
x2 = (a+1) / 0.08
y2 = (b+1) /0.1



if ceil(y1) <= ceil(x1) < y2:
    ans = ceil(x1)
    print(ans)
elif ceil(x1) <= ceil(y1) < x2:
    ans = ceil(y1)
    print(ans)
else:
    print(-1)

Solution (Python):
a,b=map(int,input().split())
for i in range(1000000):
        if i//12.5==a and i//10==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):
import math

a, b = input().split() 
a, b = int(a), int(b)
 
result_a = int(math.ceil(a / 0.08))
result_b = int(math.ceil(b / 0.1))
 
if result_a < 0 or result_b < 0:
  print(-1)
elif result_a > result_b:
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

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

Solution (Python):
import sys
input = sys.stdin.readline
A, B = [int(x) for x in input().strip().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())
s = 1 / 0.08
t = 1 / 0.1
ans = -1
for i in range(1009):
    if i//s==a and i//t==b:
        ans = i
        break
print(ans)

Solution (Python):
A, B = map(int,input().split())
 
sum_A = int(A/0.08)
sum_B = int(B/0.10)

flag = True
for i in range(1010):
    if A == int(i * 0.08) and B == int(i * 0.10):
        print(i)
        flag = False
        break
    else:
        
        continue
if flag:
    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())
for i in  range(1,1300):
  if int(i*0.08)==a and int(i*0.1)==b:
    print(i)
    exit()
print(-1)

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

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

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

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

min_x = max(A//0.08,B//0.10) +1
max_x = (min((A+1)/8,(B+1)/10)*100)

if max_x-min_x>0:
    ans = int(min_x)
else:
    ans = -1
print(ans)

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

if __name__ == '__main__':
    resolve()

Solution (Python):
import math


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


Ans = -1
tmp08_min = math.ceil(A / 0.08)
tmp08_max = tmp08_min + 12
tmp10_min = math.ceil(B / 0.10)
tmp10_max = tmp10_min + 9

tmp_min = min(tmp08_min, tmp10_min)
tmp_max = max(tmp08_max, tmp10_max)

tmp = tmp_min
while tmp <= tmp_max:
    if(A == int(tmp * 0.08) and B == int(tmp * 0.10)):
        Ans = tmp
        break
    tmp += 1


print(Ans)

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

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

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


import math
asil1_1 = (100*(A))/8
asil1_2 = (100*(A+1))/8
asil2_1 = 10*(B)
asil2_2 = 10*(B+1)
sonuc_1 = max(asil1_1, asil2_1)
sonuc_2 = min(asil2_2, asil1_2)
if math.ceil(sonuc_1)>=sonuc_2:
    print(-1)
else:
    print(math.ceil(sonuc_1))

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

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

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

    ok = False
    for i in range(1, 11000):
        if int(i * 0.08) == A and int(i * 0.1) == B:
            print(i)
            ok = True
            break
    
    if not ok:
        print(-1)

if __name__ == "__main__":
    main()

Solution (Python):
import math

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

    print(-1)

if __name__ == '__main__':
    main()

Solution (Python):
import math
import sys
 
nums = list(map(int, input().split()))
a = nums[0]
b = nums[1]
 
for i in range(1200):
  if math.floor(i * 0.08) == a and math.floor(i*0.1) == b:
      print(i)
      sys.exit()
 
print(-1)

Solution (Python):
import math
 
A, B = list(map(int, input().split()))
x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print(-1)
else:
  for x in range(max(x_minA, x_minB), min(x_maxA, x_maxB)+1):
    if int(x * 8 / 100) == A and int(x / 10)==B:
      print(x)
      break
  else:
    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:
        print(i)
        break
        
else:
        print(-1)

Solution (Python):
from math import floor
from sys import exit

A, B = map(int, input().split())
for N in range(1200):
    if floor(N * 0.08) == A and floor(N * 0.1) == B:
        print(N)
        exit()
print(-1)

Solution (Python):

import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    A,B = LMIIS()
    
    from math import ceil,floor
    
    
    
    A_min = ceil(A/0.08)
    A_max = ceil((A+1)/0.08)-1
    B_min = ceil(B/0.1)
    B_max = ceil((B+1)/0.1)-1
    
    if A_max < B_min or B_max < A_min:
        print(-1)
    else:
        print(max(A_min,B_min))
    
    
    
    
    
    
    

    

if __name__ == '__main__':
    main()

Solution (Python):

import collections
import math


class Solution:
    def solve(self, A, B):
        for i in range(10**4):
            aTax, bTax = math.floor(i*0.08), math.floor(i * 0.1)

            if aTax == A and bTax == B:
                return i

        return -1


sol = Solution()

[A, B] = list(map(int, input().strip().split()))
print(sol.solve(A, B))

Solution (Python):
import math

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

for n in range(0, 10):
  for m in range(0, 10):
    x = math.floor((A + n/10) / 0.08 + 0.5)
    y = math.floor((B + m/10) / 0.1 + 0.5)
    if x == y:
      if math.floor(x * 0.08) == A and math.floor(y * 0.1):
        print(x)
        exit()
print("-1")