program prob3
    implicit none
    integer :: a,b,i
    read(*,*) a,b
    do i = 1, 100000
        if((i*8)/100 == a .and. (i*10)/100 == b) then
            write(*,*) i
            stop
        end if
    end do
    write(*,*) "-1"
    stop
contains
end program prob3