For one thing, there is no such IMAP server as apple.imap.mail.yahoo
The free yahoo mail is a POP3 account - pop.mail.yahoo.com (port 110)
Paid Yahoo plus accounts can get IMAP, which would be imap.mail.yahoo.com port=993 and requires SSL (I've never heard of the free accounts offering IMAP).
Did not know that set up as IMAP, thanks for the info.
To the OP, regardless, if you are using the wizard, you just need your yahoo ID and password. Even if you were setting it up manually, the IMAP path you entered in this post's header is a non-existant server (.yahoo is not even a domain, and Apple does not have anything to do with yahoo's free mail service).
P.S. so a little digging indicates they use a redirected mail host specifically for Apple mobile devices - imap.apple.yahoo.com but posts on yahoo indicate the login is completely non-standard and while it works via the iOS email account wizard, people do not seem to be able to get it to work if manually trying to set up yahoo mail under iOS. Nor does that server address seem to work if used from email clients other than Apple's iOS mail app.