YahooCEO Jerry Yang has a message for his Microsoft counterpart Steve Ballmer: Microsoft should buy Yahoo, and Ballmer only has to say the word and Yang will be sitting at the negotiating table.

"To this day I would say that the best thing for Microsoft to do is to buy Yahoo," Yang said during a keynote appearance at the Web 2.0 Summit in San Francisco on Wednesday.

Asked by conference chair John Battelle whether Yahoo's asking price would be in the range it was in May, Yang said: "Oh no. At the right price, whatever the price is."

If those sound like desperate words, well, these are desperate times for Yahoo. It's embarking on its second round of layoffs of the year, this time looking to slash 10 percent of its staff. It is playing catch up in the social media revolution, belatedly trying to adapt its sites and services to be more like Facebook and MySpace.

A year ago its stock price closed at close to $27 per share: today it closed below $14 per share, no doubt making that final offer from Microsoft of $33 per share a very attractive one in hindsight.

Yet, for three months between February and May, Ballmer pursued Yahoo and got rebuffed, while Yang, in the eyes of his critics, seemingly tried to do his best to repel Microsoft.

He talked to News Corp. about possibly fusing with MySpace. He met with Time Warner about an AOL merger. He created an employee severance package that critics described as a poison pill. He sought a partnership with Google.

It was the possibility of a deal with Google that Ballmer cited as the straw that broke the camel's back and soured Microsoft on acquiring Yahoo.

Later, in June, Yahoo did end up striking a deal to run Google search ads and split the revenue, but intense scrutiny by the U.S. Department of Justice over anti-trust concerns prompted Google to back out this week.

Except for recent rumors that Yahoo might acquire AOL -- rumors that have again lost steam -- Yang finds himself without many options for a quick solution to Yahoo's woes. Microsoft is now no longer interested in acquiring Yahoo, and the Google partnership has collapsed.

As he has maintained since May, Yang told Battelle that the perception that he tried to sabotage the Microsoft bid to keep Yahoo independent is incorrect. At the time Microsoft walked away, Yahoo was still willing to negotiate and felt they were getting closer to an agreement.

Yang also said he's disappointed that the DOJ adopted such a negative attitude towards the Google deal, saying the government failed to properly understand the implications of the agreement. He also expressed disappointment that Google opted to give up.

Still, Yang was optimistic that Yahoo will be able to snap out of its technology and financial funk through the ambitious projects it is engaged in. He mentioned Y OS, the initiative to open Yahoo services up more broadly to outside developers and to create for end users a single dashboard to manage their Yahoo services and online activities in general. He also cited its new APT advertising platform, designed to simplify the buying and selling of ads for marketers and publishers.

Yet, the conversation circled back to Microsoft and the acquisition that wasn't. Yang reiterated his willingness to sit down an talk, even about a search partnership. In June, after walking away from the acquisition bid, Microsoft offered to buy Yahoo's search business, but Yahoo opted for the more limited deal with Google. "With Microsoft, if they want to buy the whole company, we're around for that," Yang said.

"As far as a search deal goes, we're very open-minded about it," he added.

In June, Yahoo determined that Microsoft's offer to buy its search business wasn't in its best interest. But today? "It doesn't mean we won't do one. As we go through thinking about where we want to take the company in the future, we remain open to everything," he said.

Did you hear that Steve Ballmer?

To comment on this article and other PCWorld content, visit our Facebook page or our Twitter feed.