If you buy a high-yielding dividend stock that's trading at a low earnings multiple, it can significantly improve your odds of making a good profit on your investment. Although the outlook for the economy may not be the greatest, if you're a long-term investor, you just need to be confident that the businesses you're investing in will be able to weather the current storm and remain good buys afterward.

Pfizer (PFE 0.23%) and Goldman Sachs (GS 1.57%) are stocks that should be fairly safe investments to hang on to here. While there is some near-term risk facing these companies, over the long haul they should make for safe pillars that you can build your portfolio around. 

1. Pfizer

Pfizer is a top name in healthcare, but investors have been bearish on the outlook for the business in a post-COVID world. For investors who can look beyond that, however, there's an incredible buying opportunity.

The company expects to add $25 billion to its top line by 2030 through a combination of its recent acquisitions and its own pipeline of vaccines and drugs. For a business that has more than $35 billion on its books in cash and short-term investments, Pfizer also has plenty of resources at its disposal that can help the company seek out more acquisitions or spend more on research and development to strengthen its growth prospects even further.

Although there's some risk and uncertainty about how the company will be able to make up for a drop in COVID-19 vaccine revenue, the stock's low price-to-earnings multiple of less than 10 already looks to have priced in a good chunk of that risk. Plus, Pfizer has a possible treatment for long COVID as well as a combination vaccine for COVID and the flu, so future revenue from COVID-related products could still be well into the billions. This year, Pfizer will generate more than $50 billion in revenue from its COVID-19 vaccine and pill.

Down 17% this year, Pfizer's stock has performed in line with the markets. At its reduced price, income investors have the opportunity to grab a great yield, as Pfizer's stock now pays 3.4% -- double the S&P 500 average of 1.7%.

2. Goldman Sachs

Shares of top investment bank Goldman Sachs have been rising of late, and on a year-to-date basis they are up almost 1%. Like Pfizer, the investment bank also trades at around 10 times its earnings. Financial stocks don't normally trade at large earnings multiples, but this is still low for Goldman -- over the past decade, it has had an average earnings multiple of almost 12. And the valuation is also a bit higher with financial stocks surging recently thanks to better-than-expected inflation numbers reported earlier this month. If that trend doesn't continue, Goldman's rally could be brief.

Revenue of just under $12 billion for the period ended Sept. 30 was down 12% year over year as the company's investment banking business struggled due to a softer market and less activity with respect to mergers and acquisitions. However, these are cyclical issues and the company is making efforts to bolster its financials, such as by restructuring its business and limiting its exposure to consumer products, which have been a drag on its bottom line. 

Amid a reorganization and the economy facing an uncertain future, Goldman Sachs can seem like a bit of a contrarian investment right now. But its reduced valuation makes it an attractive option for long-term investors as the business is likely to succeed when looking at the much wider time frame. Goldman's stock also offers an above-average yield of 2.6%. And with a payout ratio of 25%, it looks incredibly safe.

Although the stock has been rallying of late, it remains cheap. It could do even better, especially if Goldman's restructuring pays off and leads to greater profitability in the long run. Buying and holding the stock today could be a great move for long-term investors to make.