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

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

for i in range(1, 1010):
    c = int(i*0.08)
    d = int(i*0.1)
    if a==c and b==d:
        e = i
        break

print(e)

Solution (Python):
import sys
import math

A, B = map(int, input().split())
C = math.ceil(A / 8 * 100)
while True:
    tax8 = C * 0.08
    if math.floor(tax8) > A:
        break
    tax10 = C * 0.1
    if math.floor(tax10) == B:
        print(C)
        sys.exit(0)
    C += 1
print(-1)

Solution (Python):
import sys

A, B = map(int, sys.stdin.readline().rstrip().split())
c = 1e-10
d = 1 - c
A_min = int(A * (100 / 8.) + d)
A_max = int((A + d) * (100 / 8.))
B_min = int(B * 10.)
B_max = int((B + d) * 10.)

if min(A_max, B_max) - max(A_min, B_min) >= 0:
    print(max(A_min, B_min))
else:
    print('-1')

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



SA=(math.floor(float(A)/0.08),math.ceil(float(A)/0.08))
SB=(math.floor(float(B)/0.08),math.ceil(float(B)/0.08))
ans=[]
for i in range(1,10003):
    SSA=math.floor(i*0.08)
    SSB = math.floor(i * 0.1)
    if SSA==A and SSB==B:
        print(i)
        exit()
print(-1)

Solution (Python):
import math
A, B = map(int, input().split())
taxA = A / 8 * 100
taxB = B * 10
judge = True
litaxB = [taxB + i for i in range(10)]
if taxA - int(taxA) < 0.5:
    litaxA = [int(taxA) + j for j in range(13)]
else:
    litaxA = [int(taxA) + 1 + j for j in range(12)]
for k in litaxA:
    if k in litaxB:
        print(k)
        judge = False
        break
if judge == True:
    print(-1)

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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



if __name__ == '__main__':
    main()

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = il()
    for n in range(1100):
        if int(n*0.08) == A and int(n*0.1) == B:
            print(n)
            exit()
    else:
        print(-1)



if __name__ == '__main__':
    main()

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

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

Solution (Python):
a,b=map(int,input().split())
x=0
for i in range(1251):
  if x == 0 and int(i*0.08) == a and int(i*0.10) == b:
    print(i)
    x=1
  if x == 0 and i == 1250:
    print("-1")

Solution (Python):
a,b=map(int,input().split())
x=0
for i in range(2000):
  if x == 0 and int(i*0.08) == a and int(i*0.10) == b:
    print(i)
    x=1
  if x == 0 and i == 1299:
    print("-1")

Solution (Python):
import math

eight, ten = map(int, input().split())

eight_price = eight / 0.08
ten_price = ten / 0.1

if eight_price >= ten_price:
    bigger = eight_price
    if (bigger // 10) != ten:
        print("-1")
    else:
        print(math.ceil(bigger))
else:
    bigger = ten_price
    if (bigger * 8 // 100) != eight:
        print("-1")
    else:
        print(math.ceil(bigger))

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

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 = map(int, input().split())
amin = math.ceil(a * 100 / 8)
amax = math.ceil((a+1) * 100 / 8) - 1
bmin = math.ceil(b * 100 / 10)
bmax = math.ceil((b+1) * 100 / 10) -1

if amin > bmax or bmin > amax:
    print('-1')
else:
    print(max(amin, bmin))

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

a0 = -(-25*a // 2)
a1 = 25*(a+1) // 2
b0 = -(-10*b // 1)
b1 = -(-10*(b+1) / 1)

if a0 <= b0 and b0 < a1:
    print(b0)
elif b0 <= a0 and a0 < b1:
    print(a0)
else:
    print(-1)

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

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

Solution (Python):
import math
from collections import Counter

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

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

x = a/0.08
x_1 = (a+1)/0.08
y = b/0.1
y_1 = (b+1)/0.1

if is_integer_num(x_1):
    x_li = set(range(math.ceil(x),int(x_1)))
else:
    x_li = set(range(math.ceil(x),math.floor(x_1)))
    
if is_integer_num(y_1):
    y_li = set(range(math.ceil(y),int(y_1)))
else:
    y_li = set(range(math.ceil(y),math.floor(y_1)))

li=x_li&y_li

if list(li) == []:
    print(-1)
else:    
    print(min(li))

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

    A,B = (int(i) for i in input().split())

    eight = math.ceil(A / 0.08)
    ten = math.ceil(B / 0.1)
    
    ans = max(eight, ten)
    ans8 = math.floor(ans * 0.08)
    ans10 = math.floor(ans * 0.1)
    
    if ans8 == A and ans10 == B:
        print(ans)
    else:
        print(-1)


if __name__ == '__main__':
    main()

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

Solution (Python):
import math
A,B = map(int,input().split())
X1 = math.ceil(A / 0.08)
X1max = (A+1) / 0.08
X2 = math.ceil(B / 0.10)
X2max = (B+1) / 0.10


X = max(X1,X2)
if X2max <= X1 or X1max <= X2:
    print(-1)
else:
    print(X)

Solution (Python):
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
from math import floor,ceil
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

M = mod = 998244353
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)

def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]


a,b = li()
ans = float('inf')
i = b
j = a

d = defaultdict(int)
low1,high1 = a/0.08,(a + 1)/0.08
low2,high2 = b/(0.1),(b + 1)/0.1
for i in range(ceil(low1),ceil(high1),1):
    d[i] += 1

ans = -1
for i in range(ceil(low2),ceil(high2),1):
    if d[i]:
        ans = i
        break

print(ans)

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

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

price_8=100*a/8
price_10=100*b/10

if(math.floor(price_8+12.5)>price_10 and math.floor(price_10+10)>math.ceil(price_8)):
    print(max(int(price_10), math.ceil(price_8)))
else:
    print(-1)

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

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

n = 0
    
if a * 12.5 < (b+1) * 10 and b * 10 < (a+1) * 12.5:
    while n < a * 12.5 or n < b * 10:
        n += 1
    else:
        print(n)
else:
    print('-1')

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

price = b * 10

for i in range(10):
  if int((price + i) * 0.08) == a:
    print(price + i)
    exit()
else:
  print("-1")

Solution (Python):
import math
a, b = map(int, input().split())
if ((a + 1)* 12.5 - 1 - b * 10) * (a * 12.5 - (b + 1) * 10 + 1)> 0:
    print(-1)
    exit()
print(max(math.ceil(a * 12.5), b * 10))

Solution (Python):
import math
A,B = map(int, input().split())
answerA = math.ceil(A/0.08)
answerAA = math.ceil((A+1)/0.08 -1)
answerB = math.ceil(B/0.1)
answerBB = math.ceil((B+1)/0.1 -1)
if answerA == answerAA:
    if answerA >= answerB and answerA <= answerBB:
        print(answerA)
elif answerB == answerBB:
    if answerB >= answerA and answerB <= answerAA:
        print(answerB)
else:
    if answerB > answerAA:
        print("-1")
    elif answerB == answerAA:
        print(answerAA)
    elif answerA < answerB and answerAA > answerB:
        print(answerB)
    elif answerA == answerB:
        print(answerB)
    elif answerB < answerA and answerBB >= answerA:
        print(answerA)
    elif answerBB < answerA:
        print("-1")
    else:
        print("-1")

Solution (Python):

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

Solution (Python):

import sys
import math
a, b = map(int, input().split())
for x in range(1, 1001, 1):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        print(x)
        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):
a ,b = map(int,input().split())
ans = 100000000000

x = int(a / 0.08) 
y = int((b+10) / 0.1) 

z = 0

for i in range(x, y):
  if int(i * 0.08) == a and int(i * 0.1)  == b and i < ans:
    ans = i
    z = 1

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

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import math
import itertools
import string
import queue
import copy
import time
from fractions import gcd

sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())
 
def inp_list(): return list(map(int, sys.stdin.readline().split()))

def lcm(x, y): return (x * y) // gcd(x, y)


a, b = inp_list()
for n in range(1251):
    wo_tax_a = int(n * 0.08)
    wo_tax_b = int(n * 0.10)
    if wo_tax_a == a and wo_tax_b == b:
        print(n)
        exit()
print(-1)

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import math
import itertools
import string
import queue
import copy
import time
import numpy as np
from fractions import gcd

sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())
 
def inp_list(): return list(map(int, sys.stdin.readline().split()))

def lcm(x, y): return (x * y) // gcd(x, y)


a, b = inp_list()
for n in range(1251):
    wo_tax_a = int(n * 0.08)
    wo_tax_b = int(n * 0.10)
    if wo_tax_a == a and wo_tax_b == b:
        print(n)
        exit()
print(-1)

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

Solution (Python):
import math

A, B = map(int, input().split())
Al = math.ceil(A / 0.08)
Am = math.ceil((A+1)/0.08)

Bl = int(B / 0.1)
Bm = int((B+1) / 0.1)

Ar = list(range(Al, Am))
Br = list(range(Bl, Bm))

for i in Ar:
    if i in Br:
        print(i)
        break
    else:
        continue
else:
    print(-1)

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

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

import math
for i in range(1250):
  if math.floor(i *0.08)==A and math.floor(i*0.1)==B:
    if ans>i:
      ans=i
if ans==10000:
  print(-1)
else:
  print(ans)

Solution (Python):
import math

A, B = map(int, input().split())
min = B * 10
max = B * 10 + 9
flag = False
for i in range(min, max + 1):
    temp = math.floor(i * 0.08)
    if (temp == A):
        flag = True
        ans = i
        break
if flag:
    print(ans)
else:
    print('-1')

Solution (Python):
import math
A, B = map(int, input().split())
for i in range(1001):
    if (math.floor(i*0.08)==A) & (math.floor(i*0.1)==B):
        ans = i
        break
    ans = -1

print(ans)

Solution (Python):
import math

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

for i in range(10):
    if math.floor((B*10+i)*8/100) == A:
        print(B*10+i)
        exit()

print(-1)

Solution (Python):
a, b = map(int, input().split())
min_a = a//0.08
max_a = (a+1)//0.08
min_b = b//0.1
max_b = (b+1)//0.1
a_array = set(range(int(min_a)+1, int(max_a)))
b_array = set(range(int(min_b)+1, int(max_b)))
common = a_array & b_array
print("-1" if len(common) == 0 else min(common))

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

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

ans = 0
for i in range(1, 1251):
    if (math.floor(i*0.08) == a) and (math.floor(i*0.1) == b): 
        print(i)
        exit()
    else:
        ans+=1

if ans == 1250:
    print("-1")

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

Solution (Python):
import math
import sys
A,B=map(int, input().split())
Min=min(math.floor(A/0.08),math.floor(B/0.1))
Max=max(math.floor((A+1)/0.08),math.floor((B+1)/0.1))
for i in range(Min,Max):
    
    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 = map(int, input().split())

mina = math.ceil(a * 100 / 8)
maxa = math.floor((a + 0.9) * 100 / 8)
minb = math.ceil(b * 100 / 10)
maxb = math.floor((b + 0.9) * 10)

if maxb < mina or maxa < minb:
    print(-1)
elif mina > minb:
    print(mina)
else:
    print(minb)

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

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

if a == 100000:
  print(-1)
else:
  print(a)

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

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

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

Solution (Python):
import math
import itertools
import statistics

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

price = math.ceil(a/0.08)
if b==price*0.1//1:
    ans = int(price//1)
    print(ans)
else:
    price += 1
    while math.floor(price*0.08)==a:
        if b==price*0.1//1:
            ans = int(price//1)
            print(ans)
            exit()
        price += 1

    print("-1")

Solution (Python):
A,B=tuple(int(i) for i in input().split(" "))
err=lambda X:abs(int(X*0.08)-A)+abs(int(X*0.10)-B)
rg=[int(A/0.08),int(B/0.10)]
rg.sort()
rg[0]-=int(1/0.08)
rg[1]+=int(1/0.08)
solv=[X for X in range(*rg) if err(X)==0]
solv.sort()
if(len(solv)==0):
    print("-1")
else:
    print(solv[0])

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

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

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

Solution (Python):
import math

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

ans = -1
for i in range(1, 10001):
    tax_8 = math.floor(i * 0.08)
    tax_10 = math.floor(i * 0.10)
    if tax_8 == A and tax_10 == B:
        ans = i
        break

print(ans)

Solution (Python):
a = list(map(int,input().split()))
A = a[0]
B = a[1]
c = True
for x in range(10001):
    a = x * 0.08
    b = x * 0.1
    if A == int(a) and B == int(b):
        print(x)
        c = False
        break
if c:
    print(-1)

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


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

if judge == 0:
    print(-1)

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

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

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

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

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

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

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

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

print(answer)

Solution (Python):
import math
a, b = [int(i) for i in input().split()]
for i in range(1250):
    if(math.floor(0.08 * i) == a and math.floor(0.1 * i) == 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):
from math import ceil


def solve(string):
    a, b = map(int, string.split())
    ans = ceil(a / 0.08)
    while ans // 10 < b:
        ans += 1
    return str(ans) if ans * 2 // 25 == a and ans // 10 == b else "-1"


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Solution (Python):
import math
a, b = map(int, input().split())
minA = a*12.5
maxA = (a+1)*12.5
minB = b*10
maxB = (b+1)*10
if maxA <= minB or maxB <= minA:
    print(-1)
else:
    print(int(math.ceil(max(minA, minB))))

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

e_min = a/0.08
e_max = (a+1)/0.08

t_min = int(b/0.1)
t_max = int((b+1)/0.1)

num = -1
for i in range(t_min, t_max):
  if i >= e_min and e_max > i:
    num = i
    break
    
print(num)

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

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

flg = False
for price in range(1,1010):
    if int(price*0.08)==A and int(price*0.1)==B:
        flg = True
        break

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

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

Solution (Python):
import math

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

flg = 0
for i in range(1,1250):
        x = math.floor(i * 0.08)
        y = math.floor(i * 0.1)
        if x == A and y == B:
                print(i)
                flg = 1
                break
if flg == 0:
        print(-1)

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

for i in range(1010):
  if i*8//100 == a and i*10//100== b:
    z = i
    break
print(z)

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

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

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

def inpl_strl(): return list(sys.stdin.readline())

a, b = inpl()
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())
 
N_A = A / 0.08
N_B = B / 0.1
A_list = [int(N_A + i) for i in range(20) if A <= int(N_A+i)*0.08 < A+1]
B_list = [int(N_B + i) for i in range(20) if B <= int(N_B+i)*0.1 < B+1]
 
N_min = float('inf')
for i in B_list:
    if i in set(A_list) and i < N_min:
        N_min = i
if N_min == float('inf'):
    print(-1)
else:
    print(N_min)

Solution (Python):





from math import floor
A, B = [int(i) for i in input().split()]


inc = floor(A / 0.08)
inc_max = (A + 1) / 0.08

while(1):
    if inc >= inc_max:
        print(-1)
        break
    elif floor(inc * 0.1) == B and floor(inc * 0.08) == A:
        print(inc)
        break
    else:
        inc += 1

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

Solution (Python):
import sys
import math
a,b=map(int,input().split())
for i in range(10*b,15*b):
  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 = 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)
        break
    elif i == 9999:
        print(-1)

Solution (Python):
import math

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

a = a_b[0]
b = a_b[1]


a_min = math.ceil(a / 0.08)
a_max = math.ceil((a+1) / 0.08)


b_min = math.ceil(b / 0.10)
b_max = math.ceil((b+1) / 0.10)

for i in range(a_min, a_max):
  if i >= b_min and i < b_max:
    print(i)
    break
  else:
    pass
  if i == a_max - 1:
    print(-1)

Solution (Python):
a, b = map(int, input().split())
r = '-1'
for i in range(10000):
	v = i + 1
	ax = int(v * 0.08)
	if ax == a:
		bx = int(v * 0.1)
		if bx == b:
			r = v
			break
print(r)

Solution (Python):
import sys
input = sys.stdin.readline
a,b=map(int,input().split())
i=1
while i<100000:
    if i*0.08//1==a and i*0.1//1==b:
        print(i)
        exit()
    i+=1
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)
        break
else:
    print(-1)

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

solution()

Solution (Python):
import sys

a,b = [int(c) for c in input().split()]
maxa = (a+1) / 0.08
maxb = (b+1) / 0.1
mina = a / 0.08
minb = b / 0.1
mmax = int(min(maxa,maxb)) - 1 if int(min(maxa,maxb))==min(maxa, maxb) else int(min(maxa,maxb))
mmin = int(max(mina,minb)) if int(max(mina,minb))==max(mina,minb) else int(max(mina,minb)) + 1
if mmin>mmax:
    print("-1")
else:
    print(mmin)

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


min_x = int(min(A//0.08, B//0.1))
max_x = int(max((A+1)//0.08, (B+1)//0.1))

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

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


import math

X1=math.ceil(A/0.08)
X2=math.ceil(B/0.1)

Y1=math.ceil((A+1)/0.08)-1
Y2=math.ceil((B+1)/0.1)-1

if X1>Y2 or X2>Y1:
    print(-1)
else:
    print(max(X1,X2))

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

Solution (Python):
import math
A, B = map(int, input().split())
V = 10000
for i in range(1, 10001):
    a = math.floor(i*0.08)
    b = math.floor(i*0.1)
    if a == A and b == B:
        
        
        if V > i:
            V = i
        else:
            continue
    else:
        continue
if V == 10000:
    print(-1)
else:
    print(V)

Solution (Python):
import math
a, b = map(int, input().split())
a_min = math.ceil(a/0.08)
b_min = math.ceil(b/0.1)
a_able = set(i for i in range(a_min, a_min+12))
b_able = set(i for i in range(b_min, b_min+10))
if a_able&b_able:
    print(min(a_able&b_able))
else:
    print(-1)

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

Solution (Python):
import math
A, B =map(int, input().split())
a, b = math.ceil(A/0.08), math.ceil(B/0.10)
ans = max(a,b)
print (ans if int(ans*0.08)==A and int(ans*0.10)== B else -1)

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

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

for i in range(0,1009):
    ans_a=int(i*0.08)
    ans_b=int(i*0.1)
    if A==ans_a and B==ans_b:
        ans=i
        break
    ans=-1

print(ans)

Solution (Python):
import math
a = list(map(int, input().split()))
ans = [max([a[0] / 0.08, a[1] / 0.1]),
       min([(a[0] + 1) / 0.08, (a[1] + 1) / 0.1])]
if ((a[0]) / 0.08 >= (a[1] + 1) / 0.1) or (a[1] / 0.1 >= (a[0] + 1) / 0.08):
    print(-1)
else:
    if math.ceil(ans[0]) > ans[1]:
        print(-1)
    else:
        print(math.ceil(ans[0]))

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

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

print(-1)

Solution (Python):



import math

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

for i in range(1251):
    num += 1
    if math.floor(num * 0.08) == A:
        if math.floor(num * 0.1) == B:
            print(num)
            exit()
else:
    print(-1)

Solution (Python):
a, b = map(int, input().split())
for i in range(1002):
    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())
flag = 1
for i in range(10001):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        flag = 0
        break
if flag ==1:
    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):
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = il()

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

    print(-1)


if __name__ == '__main__':
    main()

Solution (Python):
import math

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



motone_8 = math.ceil(A*12.5)

if (motone_8 + 12) * 0.08 >= A+1:
    
    gaitou_8 = 12

else:
    gaitou_8 = 13


gaitou_list_8 = list(range(motone_8,motone_8 + gaitou_8))



motone_10 = B*10


gaitou_list_10 = list(range(motone_10,motone_10 + 10))



kyotu_list = set(gaitou_list_8) & set(gaitou_list_10)




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

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

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

a_ = int(a / 0.08)
if a_ * 0.08 != float(a):
  a_ += 1

b_ = int(b / 0.1)
if b_ * 0.1 != float(b):
  b_ += 1

n = max(a_, b_)
if int(n * 0.08) == a and int(n * 0.1) == b:
    print(n)
else:
    print(-1)

Solution (Python):
import math
import sys
A, B = [int(i) for i in input().split()]
for i in range(math.ceil(12.5 * A), math.ceil(12.5 * (A + 1))):
    if math.floor(i//10) == B:
        print(i)
        sys.exit()
print(-1)

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

for i in range(1101):
  x = i * 8 // 100
  y = i * 1 // 10
  if x == a and y == b:
    print(i)
    exit()
else:
  print(-1)

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

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

a=int(A/0.08 + 0.5)
b=int(B/0.1 + 0.5)
out =0
"print(a,b)"
if a>=b:
    if math.floor(a*0.1) != B:
        out = -1
    else:
        out = int(a)
elif a<b:
    if math.floor(b*0.08) != A:
        out = -1
    else:
        out = int(b)
print(out)