program main
 implicit none
 integer A,B
 integer taxA, taxB
 integer i

 read *, A, B

 do i=1,1000
  taxA=i*0.08
  taxB=i*0.1

 if (taxA==A .and. taxB==B ) then
  print '(i0)',i-1
  goto 100
 end if

 end do

 print '(i0)', -1

100 continue

endprogram main
