program tax_increase
    integer a, b, i, ansa, ansb
    read *, a, b
    do i = 1, 1009
        ansa = int(i * 0.08)
        ansb = int(i * 0.1)
        if(ansa .eq. a .and. ansb .eq. b)exit
    end do
    if(i .le. 1009)then
        print *, i
    else
        print *, '-1'
    end if
end program