module tax
  sub Main(ByVal args() as String)
    dim a,b,c,g,n,x as integer
    dim counta,countb,countc as integer
    dim arr(2) as string
    arr=Split(Console.ReadLine())
 
    n=arr(0)
    g=arr(1)
    x=0

if g<=1 then
counta = 0
else
counta = (g-1)*10
end if

for a= counta to counta + 100

if int(a*0.08)=n then
    if int(a*0.1)=g then
    Console.WriteLine(a)
    Return
    end if
end if
next
a=-1
    Console.WriteLine(a)
  end sub
end module