program ABC158_C
  integer:: A,B,BR
  read(5,*)A,B
  AL=A*12.5
  AR=(A+1)*12.5
  BL=B*10
  BR=(B+1)*10
  if(AL > int(AL)) then
     AL=int(AL+1)
  else
     AL=int(AL)
  end if
  if(AR > int(AR)) then
     AR=int(AR+1)
  else
     AR=int(AR)
  end if
  if( AL <= BL .and. BL < AR ) then
     write(6,*) int(BL)
  else
     if( AL >= BL .and. AL < BR )  then
        write(6,*) int(AL)
     else
        write(6,*)'-1'
     end if
  end if
end program ABC158_C