Well, if the ports are blocked, then perhaps you can use a proxy through a specified port.
Open Yahoo Messenger, click on Messenger, then Preferences, then Connection. There you must find some 'Use proxies' option. You may have to also change the Connection setting of IE after this.
I'm on Linux, so I can't try this for you.
Edit: I got something for you.
http://www.messengeroo.com/yahoo-mes...hoo-messenger/