I had the same problem a while ago. Eventually I managed to solve it like this:
Go to https://help.yahoo.com/kb/account
Top right there is an orange bar which says:
"Can't access your account? Sign-in Helper"
Click that and follow the steps explained on the screen to receive a "key" (via your alternative e-mail address or mobile phone) which you have to enter in one of the screens you get.
This got me logged in to my account again.