Both. You need content that people might search for. But if you don't have enough quality backlinks, Yahoo will stick your results below another site with better backlinks.
First thing I think should submit to yahoo directory, and then is backlinks. Site content is important before optimization, and is the the start point when you design a site. I do think it's not good to change the content later to meet the search engine optimization.
always work on backlinks and QUALITY CONTENT check this out http://www.seomoz.org/articles/search-ranking-factors.php http://www.seomoz.org/articles/msn-beta-vs-yahoo-google.php http://www.seomoz.org/articles/age-of-sites.php http://www.seomoz.org/articles/google-vs-yahoo.php