peterverebics/CodeNet_Python_118 huggingface dataset:
import sys
import math
input = sys.stdin.readline


def main():
    A, B = map(int, input().split())
    assert A <= 100
    assert B <= 100
    for i in range(1000):
        if math.floor((i+1) * 0.08) == A and math.floor((i+1) * 0.1) == B:
            print(i+1)
            exit()
    print("-1")


if __name__ == '__main__':
    main()
import math
a, b = map(int, input().split())

for i in range(1, 1250):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        exit()
else:
    print(-1)
import math
from decimal import *
A,B = list(map(int, input().split()))
ans = -1
for x in range(1, 10001):
    a = math.floor(x * Decimal(0.08))
    b = math.floor(x * Decimal(0.1))
    if a == A and b == B:
        ans = x
        break
print(ans)
A,B = list(map(int, input().split()))
flag = 0

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

if flag == 0:
    print(-1)
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)
import math

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

cnt = -1
for i in range(1, 1001):
    hachi = math.floor(i * 0.08)
    ju = math.floor(i * 0.1)
    if hachi == a and ju == b:
        cnt = i
        break


print(cnt)
def main():
    A, B = map(int, input().split())
    x = int(A/0.08)
    y = int((A+1)/0.08)
    for i in range(x, y+1):
        if int(i*0.08) == A and int(i*0.1) == B:
            print(i)
            return
    print(-1)

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

tax1 = int(a/0.08)
tax2 = int(b/0.1)
en = 0
l = sorted([tax1,tax2])
for i in range(l[0]-1,l[1]+2):
    if int(i*0.08) == a and int(i*0.1) == b:
        print(i)
        en = 1
        break
if en == 0:
    print(-1)
import math
A,B = map(int,input().split())
flag = 0
for i in range(1,10**5):
    if math.floor(i*0.08) == A and math.floor(i*0.1) == B:
        print(i)
        flag += 1
        break
if flag == 0:
    print(-1)
import math
n,m = map(int,input().split())
if (n+1)/0.08 > m/0.1 and (m+1)/0.1 > n/0.08:
    print(max(math.ceil(n/0.08),math.ceil(m/0.1)))
else:
    print(-1)
import math

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

a_low = math.ceil(a*12.5)
a_high = math.floor((a+1)*12.5-0.01)
b_low=b*10
b_high=b*10+9

if b_high < a_low or a_high < b_low:
    print(-1)
else:
    print(max(a_low, b_low))
import numpy as np
A, B = map(int,input().split())
A,B=int(A),int(B)
c=0
d=True
while(d):
    a=int(c*0.08)
    b=int(c*0.1)
    if a==A and b==B:
        print(c)
        d=False
    elif a>A or b>B:
        print('-1')
        d=False
    else:
        c+=1 
        continue
# coding:utf-8

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

for ans in range(1, 1001):
    if int(ans * 0.08) == A and int(ans * 0.1) == B:
        print(ans)
        exit(0)
print('-1')
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)
import math
a,b = [int(i) for i in input().split()]
mina = math.ceil(a*100/8)
if (a+1)*100/8%1==0:
    maxa = (a+1)*100/8-1
else:
    maxa = math.floor((a+1)*100/8)

minb = math.ceil(b*100/10)
if (b+1)*100/10%1==0:
    maxb = (b+1)*100/10-1
else:
    maxb = math.floor((b+1)*100/10)

#print(mina,maxa,minb,maxb)

if minb<=mina and mina<=maxb:
    print(int(mina))
elif mina<=minb and minb<=maxa:
    print(int(minb))
else:
    print("-1")
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


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

    ans = 2000
    for i in range(1, 1001):
        if a == math.floor((i * 1.08)) - i and b == math.floor((i * 1.10)) - i:
            ans = min(ans, i)
    if ans == 2000:
        print('-1')
    else:
        print(ans)


main()
import sys
A, B = map(int, input().split())
ans = -1
for x in range(1010):
    a = int((x*0.08))
    b = int(x*0.1)
    if a == A and b == B:
        print(x)
        sys.exit()
print(ans)
a, b = map(int, input().split())
flag = 0
for i in range(2000):
    if (i*0.08)//1 == a:
        if (i*0.1)//1 == b:
            print(i)
            flag += 1
            break

else:
    if flag == 0:
        print("-1")
a,b=map(int,input().split())
s=0
for i in range(1,1251):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(str(i))
        s+=1
        break
if s==0:
    print("-1")
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')
A, B = map(int, input().split())

A_min = 12.5 * A
A_max = 12.5 * (A + 1)

B_min = 10 * B
B_max = 10 * (B + 1)


if A % 2 == 0:
    myList1 = list(range(int(A_min), int(A_max + 1)))
else:
    myList1 = list(range(int(A_min + 1), int(A_max)))

myList2 = list(range(int(B_min), int(B_max)))

mySet = list(set(myList1) & set(myList2))

mySet = [item for item in mySet if item >= 1]

if len(mySet) == 0:
    print(-1)
else:
    print(sorted(mySet)[0])
import math
answer = 0
score = list(map(int,input().split()))
Alist = []
for i in range(2000):
    if math.floor((i+1)*0.08) == score[0]:
        Alist.append(i+1)
for j in range(2000):
    if math.floor((j+1)*0.10) == score[1]:
        if j+1 in Alist:
            print(j+1)
            answer = 1
            break
if answer == 0:
    print(-1)
a,b=map(int,input().split())
for i in range(10**5):
    if (i*2)//25==a and i//10==b:
        print(i)
        break
else:
    print(-1)
A, B = list(map(int, input().split()))

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

    a = int(i * 1.08) - i
    b = int(i * 1.1) - i
    if A == a and B == b:
        ans = i
        break
    i += 1
print(ans)
from math import floor
A, B = map(int, input().split())

def check(x):
    if floor(x*0.08) == A and floor(x*0.1) == B:
        return True
    return False

x = 1
while(x < 1251):
    if check(x):
        break
    x += 1

if x == 1251:
    print(-1)
else:
    print(x)
a,b=map(int,input().split())
ans=-1
c=int(b*10)
d=int((b+1)*10)
for i in range(c,d):
    if int(i*0.08)==a:
        ans=i
        break
print(ans)
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)
a, b = map(int, input().split())
for i in range(b*10, (b+1)*10):
    if int(i * 0.08) == a:
        print(i)
        break
else:
    print(-1)
import math
a,b=map(int,input().split())
n=math.ceil((a*100)/8)
m=int((a*100)/10)
result=[]
for i in range(m-100,n+100):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        result.append(i)
if result==[]:
    print(-1)
    exit()
print(min(result))
a, b = map(int, input().split())
ans = -1
for i in range(10000, -1, -1):
    ans1 = int(i * 0.08)
    ans2 = int(i * 0.1)
    if ans1 == a and ans2 == b:
        ans = i
print(ans)
import math
a,b=map(int,input().split())
ans=-1
tmp=b*10
for x in range(tmp-20,tmp+20):
    if math.floor(x*0.08)==a and math.floor(x*0.10)==b:
        ans=x
        break
print(ans)
from math import floor

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

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

print(-1)
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)
import math
A,B = map(int,input().split())

ans = ""
for i in range(1,1251):
  a = math.floor(i * 0.08)
  b = math.floor(i * 0.1)
  if a == A and b == B:
    ans = i
    break
    
print(ans if ans != "" else -1)
import math
a,b = list(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)
    break
else:
  print(-1)
#!/usr/bin/env python

from sys import stdin, stderr

def main():
   A, B = map(int, stdin.readline().split())
   p = 1
   res = -1
   while True:
      a = (p * 8) / 100
      b = (p * 10) / 100
      if a > A or b > B:
         break
      if a == A and b == B:
         res = p
         break
      p += 1

   print(res)

   return 0

if __name__ == '__main__': main()
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        a,b=map(int, input().split())
        for i in range(13,1250):
            if (i*8)//100==a and (i*10)//100==b:
                return i
        return -1
    print(main())
resolve()
# -*- coding: utf-8 -*-
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)
import math
A, B = map(int, input().split())

num = math.ceil(25 / 2 * A)
A_list = []

if A % 2 == 0:
  while num <= math.floor(25 / 2 * (A + 1)):
    A_list.append(num)
    num += 1
else:
  while num < 25 / 2 * (A + 1):
    A_list.append(num)
    num += 1

res = -1
A_list.sort(reverse=True)
for item in A_list:
  if item >= 10 * B and item < 10 * (B + 1):
    res = item

print(res)
a,b =map(int,input().split())
ans = []
for i in range(1,10**4+1):
  if int(i * (8/100)) == a and int(i*(10/100)) == b:
    ans.append(i)
print('-1' if ans == [] else min(ans))
a, b = map(int, input().split())
for i in range(1011):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        print(i)
        break
else:
    print(-1)
A,B = map(int,input().split())
ans=-1
for i in range(1,1001):
  if i*0.08//1==A and i*0.1//1==B:
    ans=i
    break
print(ans)
A, B = map(int,input().split())
for i in range(10*B,10*(B+1)):
  if 10*B<= i <10*(B+1) and 12.5*A<= i < 12.5*(A+1):
    print(i)
    break
else:
  print(-1)
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)
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
import math
a,b=map(int,input().split())
ans=-1
for i in range(1,5000):
    #print(int(i*0.08))
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        #print(int(i*0.08))
        ans=i
        break
print(ans)
from math import floor
A,B = map(int,input().split(" "))
s = 10*B
t = 10*(B+1)
ans = 2**60
for tmp in range(s,t):
    if floor(tmp*0.08) == A:
        ans = tmp
        break
s = 125*A
t = 125*(A+1)
for tmp in range(s,t):
    if floor(tmp/10) == B:
        ans = min(ans,tmp)
        break
if ans == 2**60:
    ans = -1
print(ans)
a, b = input().split();
a = int(a);
b = int(b);

for x in range(1,1001):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
    ans = x;
    break;
  elif x == 100:
    ans = -1;
  else:
    pass;
  
print(ans);
a,b=map(int,input().split())
x1=int(a//0.08)+1
x2=int((a+1)//0.08)

y1=int(b//0.1)+1
y2=int((b+1)//0.1)

xx=[i for i in range(x1,x2)]
for z in xx:
    if z>=y1 and z<=y2:
        print(z)
        exit()
    
print(-1)
a, b = map(int,input().split())
if b < 10:
  for x in range(10*b,10*(b+1)):
    if int(0.08*x) == a:
      print(x)
      exit()
else:
  for x in range(10*b,10*b+10):
    if int(0.08*x) == a:
      print(x)
      exit()
print(-1)
A, B = map(int, input().split())
for i in range(1, 10001):
    x=(i*8)//100
    y=(i*10)//100
    if x==A and y==B:
        print(i)
        break
else:
    print(-1)
a, b = map(int, input().split())

start = b * 10
flg = True
for i in range(10):
  tmp = start + i
  if int(tmp*0.08) == a:
    flg = False
    break
if flg:
  print('-1')
else:
  print(int(tmp))
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))
A,B = map(int,input().split())

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

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

ans = -1

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

print(ans)
import math
a, b = map(int, input().split())

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

print(-1)
from math import floor
import sys
from copy import copy
input = sys.stdin.readline
'''
n, m = map(int, input().split())
n = int(input())
A = list(map(int, input().split()))
S = input().strip()
for test in range(int(input())):
'''
inf = 100000000000000000  # 1e17
mod = 998244353

aa, bb = map(int, input().split())
for i in range(1, 10000):
    if int(floor(i * 0.08)) == aa and int(floor(i * 0.1)) == bb:
        print(i)
        sys.exit()
print("-1")
A, B = map(int, input().split())
ans = -1
for x in range(1010):
    if int(x*0.08) == A and int(x*0.1) == B:
        ans = x
        break

print(ans)
import math


if __name__ == '__main__':
    a, b = list(map(int, input().split(" ")))
    for i in range(1, 1500):
        # print(i)
        if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
            print(i)
            exit()
    print(-1)
A,B = map(int,input().split(sep=" "))
i = 0
for i in range(0, 1251,1):
    if i*8//100 == A and i*10//100 == B:
        print(i)
        exit()
print(-1)
import math
A,B = map(int,input().split())
ans = 0
while 1:
    C = math.floor(ans*0.08)
    D = math.floor(ans*0.1)
    if C == A and D == B:
        print(ans)
        break
    if C > A or D > B:
        print(-1)
        break
    ans += 1
A, B = map(int, input().split())
for i in range(500000):
    a = i * 8 // 100
    b = i // 10
    if (a, b) == (A, B):
        print(i)
        exit()
print(-1)
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)
import math
A, B = map(int, input().split())
b1 = B*10
b2 = b1 + 10

for i in range(b1, b2):
    if math.floor(i*0.08) == A:
        print(i)
        break

    if i == b2-1:
        print(-1)
def tax(a, b):
    for i in range(1,1010):
        if int(i*0.08) == a and int(i*0.1) == b:
            print(i)
            return
    print(-1)
    return

a, b = map(int, input().strip().split())
tax(a,b)
a,b = map(int,input().split())
ten = []
ei = []
for i in range(1,1010):
    if a <= i*0.08 < a+1:
        ei.append(i)
for j in range(1,1010):
    if b <= j*0.1 < b+1:
        ten.append(j)
case = set(ei) & set(ten)
if not case:
    print(-1)
else:
    print(min(case))
a, b = map(int, input().split())
flag = 0

for i in range(1, 1001):
    hati = int(i * 0.08)
    juu = int(i * 0.1)
    
    if hati == a and juu == b:
        flag = 1
        print(i)
        break
    
if flag == 0:
    print("-1")
a, b = map(int, input().split())

ans = -1
for v in range((100*10)+100):
  t8 = int(v * 0.08)
  t10 = int(v * 0.1)

  if t8 > a or t10 > b:
    break

  if t8 == a and t10 == b:
    ans = v
    break

print(ans)
def rounder(x):
    flt = x - int(x)
    if flt>=0.5:
        return int(x)+1
    else:
        return int(x)

def main():
    a, b = map(int, input().split())
    A = list(range(rounder(a/0.08), rounder((a+1)/0.08)))
    B = list(range(rounder(b/0.10), rounder((b+1)/0.10)))
    r = -1

    for i in range(len(B)):
        if B[i] in A:
            r = B[i]
            break
    print(r)

main()
import math
 
t8,t10=map(int,input().split(" "))
 
mint8=t8/0.08
maxt8=(t8+1)/0.08
mint10=t10/0.1
maxt10=(t10+1)/0.1
 
ans=list(set(range(math.ceil(mint8),int(maxt8))) & set(range(math.ceil(mint10),int(maxt10))))
if len(ans)==0:
    print(-1)
else:
    print(min(ans))
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)
a,b = map(int, input().split())
for i in range(1,10000):
  if i*8//100 == a:
    if i*10//100 == b:
      print(i)
      break
else:
  print(-1)
A, B = map(int, input().split())
for i in range(B*100):
    if i*8//100 == A and i * 10 // 100 == B:
        print(i)
        exit()

print(-1)
A, B = map(int, input().split())
for i in range(1, 1100):
    if int(i*0.08)==A and int(i*0.1)==B:
        print(i)
        break
else:
    print(-1)
a,b=map(int,input().split())
for price in range(1,10000+1):
  if int(price*0.08) == a and int(price*0.10) == b:
    print(price)
    quit()
print(-1)
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)
A, B = map(int, input().split())
flag = 0
for i in range(1300):
  if int(i*0.08) == A and int(i*0.1) == B:
    print(i)
    flag = 1
    break
if flag == 0:
  print(-1)
a,b = map(int,input().split())
if a/0.08 == a//0.08:
    emin = a//0.08
else:
    emin = a//0.08+1
if (a+1)/0.08 == (a+1)//0.08:
    emax = (a+1)//0.08-1
else:
    emax = (a+1)//0.08
tmin = b/0.1
tmax = (b+1)/0.1-1
if tmax >= emax:
    if tmin <= emax:
        print(int(tmin))
    else:
        print(-1)
else:
    if emin <= tmax:
        print(int(emin))
    else:
        print(-1)
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(0)

print(-1)
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)
A, B = map(int, input().split())

Amin= A*100/8
AMAX= (A+1)*100/8
Bmin= B*100/10
BMAX= (B+1)*100/10

Alist=[0]*1257
Blist=[0]*1257
ANSlist=[10000]*1257

for i in range(1257):
    if Amin <=i <AMAX:
        Alist[i]=i

for i in range(1257):
    if Bmin <=i <BMAX:
        Blist[i]=i

for i in range(1257):
    if Alist[i]!=0 and Blist[i]!=0:
        ANSlist[i]=i

if min(ANSlist)==10000:
    print(-1)
else:
    print(min(ANSlist))
a, b = map(int,input().split())
ans = -1
for i in range(1500):
  if (a==int(i*0.08)) and (b==int(i*0.1)):
    ans = i
    break
print(ans)
#!/usr/bin/env python3
import sys
import math

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

c = math.ceil(b / 0.1)

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

print(-1)
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)
import math
a = list(map(int,input().split()))

flag = False
for i in range(1001):
  if math.floor(i*0.08) == a[0]:
    if math.floor(i*0.1) == a[1]:
      flag = True
      break

if flag:
  print(i)
else:
  print("-1")
import math
a, b = map(int, input().split())

def solve(x):
    return math.floor(x * 0.08) == a and math.floor(x * 0.1) == b

for i in range(1, 10**5):
    if solve(i):
        print(i)
        exit()

print(-1)
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)
A,B = map(int, input().split())

## 全探索
for i in range(1,1010,1):
  ans_8 = int(i * 0.08)
  if A == ans_8:
    ans_10 = int(i * 0.10)    
    if B == ans_10:
      print(i)
      exit()
else:
  print('-1')
a,b=map(int,input().split())
d=int(a/0.08)
u=int(b/0.1)
ans=-1
if min(d,u)>12:
    start=min(d,u)-12
else:
    start=0
for i in range(start,max(d,u)+13):
    if (int(i*0.08)==a)and(int(i*0.1)==b):
        ans=i
        break
print(ans)
import math
a,b = [float(i) for i in input().split()]
ans = 1000000000
flag = False

for i in range(1,10000):
    ans8 = int(math.floor(i*0.08))
    ans10 = int(math.floor(i*0.1))
#     print(ans8,ans10)
    if ans8 == a and ans10 == b:
        ans = min(ans, i)
        flag = True

if flag is True:
    print(ans)
else:
    print(-1)
i = input().split(' ')
A = int(i[0])
B = int(i[1])

for x in range(1,10000000):
    B_hat = int(x/10)
    if B_hat>100:
        break
    if int(x*2/25)==A and B_hat==B:
        print(x)
        exit()
print(-1)
a,b=map(int,input().split())
def ceil(x):
  if x%1==0:
    return x//1
  else:
    return x//1+1
a1=int(ceil(a*100/8))
a2=int(ceil((a+1)*100/8)-1)
b1=int(ceil(b*100/10))
b2=int(ceil((b+1)*100/10)-1)
count=0
for i in range(a1,a2+1):
  if b1<=i<=b2:
    print(i)
    count=0
    break
  else:
    count+=1
if count!=0:
  print(-1)
import sys

a, b = map(float, sys.stdin.readline().split())
ans = -1
for i in range(1, 1251):
    if (int(i * 0.08) == a) and (int(i * 0.1) == b):
        ans = i
        break

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

ans = []
for ans in range(1,1251):
    if math.floor(ans*0.08) == A and math.floor(ans*0.1) == B:
        print(ans)
        exit()

print(-1)
A,B = map(int,input().split())
for x in range(1,10001):
  if (0.1*x)//1 == B and (0.08*x)//1 == A:
    print(x)
    exit(0)
print(-1)
A, B = map(int, input().split())
_MAX_PRICE = 1001
for n in range(1, _MAX_PRICE):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    print(n)
    exit()
print(-1)
A,B=map(int,input().split())
A0=[100*A/8,100*(A+1)/8]
B0=[100*B/10,100*(B+1)/10]
S0=max(A0[0],B0[0])
S1=min(A0[1],B0[1])
if int(S0)>=S0 and int(S0)<S1:
    print(int(S0))
elif int(S0)+1<S1:
    print(int(S0)+1)
else:
    print(-1)
x,y=map(int, input().split())
import math
x1=math.ceil(x*12.5)
x2=math.ceil((x+1)*12.5)-1
y1=math.ceil(y*10)
y2=math.ceil((y+1)*10)-1
if x1>y2 or y1>x2:
	print (-1)
else:
	print (int(max(x1,y1)))
A, B = list(map(int, input().split()))
ans = -1
for i in range(1, 1009):
    if int(i*0.08) == A and int(i*0.10) == B:
        ans = i
        break
print(ans)
import math

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

ret = -1
for i in range(1, 1251):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        ret = i
        break
print(ret)
a,b=map(int,input().split())
import math 
ans=0
for i in range(1,1001):
    aa=math.floor(i*0.08)
    bb=math.floor(i*0.1)
    if aa==a and bb==b:
        print(i)
        break
else:
    print(-1)
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
a, b = map(int, input().split())
ans = 0

for i in range(1270):
  x = i * 8
  y = x / 100
  z = i * 10
  q = z / 100
  if a == int(y) and b == int(q):
    if ans == 0:
      ans = i
    else:
      ans = min(ans, i)

if ans == 0:
  print(-1)
else:
  print(ans)
from math import floor

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

list = []
if 100*a%8:
  x=int(a/0.08)+1
else:
  x=int(a/0.08)

if 100*(a+1)%8:
    y=int((a+1)/0.08)
else:
    y=int((a+1)/0.08)-1

    
for i in range(x, y+1):
    if b/0.1 <= i <(b+1)/0.1:
        list.append(i)

        
list = sorted(list)
if list:
    print(list[0])
else:
    print('-1')
a,b = map(int, input().split())
for i in range(1, 1100):
    if i * 0.08 //1 == a and i * 0.1 //1 == b:
        print(i)
        break
else:
    print(-1)
from math import floor
A, B = map(int, input().split())

ans = 10**9
for i in range(1, 100000):
    a = floor(i * 0.08)
    b = floor(i * 0.1)

    if a == A and b == B:
        ans = min(ans, i)

if ans == 10**9:
    print(-1)
else:
    print(ans)
import sys
#read = sys.stdin.read
from math import floor
def main():
    a, b = map(int, input().split())
    for i1 in range(1251):
        if floor(i1 * 0.08) == a and floor(i1 * 0.1) == b:
            print(i1)
            sys.exit()
    print(-1)


if __name__ == '__main__':
    main()