Welcome Keshav to this community,
First of all, let us know what distro you are using or better just include it in your profile. Including distro makes it easier for people running the same distro to solve your problem right away rather than speculating and giving you half answers...coming to the problem. I suggest you
1. Look
here for yahoo messenger configuration.
2. Look around in this forum for yahoo messenger related problems.
3. Use
gaim instead. It is an excellent program and much better than Yahoo Messenger for Unix. I used Yahoo Messenger for sometime but since I've found gaim...i've just trashed Yahoo Messenger