NEW YORK (Reuters) - Bill Gates and Warren Buffett on Friday expressed optimism that the United States will move ahead as a nation, even as it works through political differences and gets used to the new Trump administration.

Slideshow ( 9 images )

The world’s two richest people were speaking to students at Columbia University after U.S. President Donald Trump started to unwind the work of his predecessor Barack Obama in a series of executive orders, prompting concern from critics over what the actions mean for Americans and their place in the world.

“I am confident that America will move ahead,” Buffett said.

Gates, meanwhile, said the desire for innovation and support for research are “strong” and “largely bipartisan,” despite differences on how to accomplish and fund both.

“This administration is new enough; we don’t know how its budget priorities are going to come out,” but there is much intensity to ensure that the executive branch and Congress encourage “amazing things,” Gates said.

Gates co-founded and was the first chief executive of Microsoft Corp, while Buffett runs the conglomerate Berkshire Hathaway Inc.

Forbes magazine said on Friday that Gates is worth $85.2 billion and Buffett is worth $73.9 billion.

An estimated 1,300 people attended Friday’s event to watch the close friends, who have known each other for a quarter century.

Gates is also a Berkshire director, while Buffett is donating much of his wealth to the charitable foundation set up by Gates and his wife, Melinda.

Both told students it is important to invest and focus on doing good works over the long term, despite the impulse or perceived need for shorter-term thinking.

Gates said this was particularly true in areas such as climate change and vaccinations, calling it just as important to be sure people can get vaccines as it is to develop them.

Buffett said: “It’s very hard to have politicians think of something that’s wonderful for the country 20 years from now” if the short-term impact might cost them reelection, with their decisions often tainted by too much money, which he called “bad news.”

He also stressed the importance of immigration, a central issue for Trump, whom neither Buffett nor Gates discussed.

Buffett said the country has been “blessed” by immigrants, and might have come out quite different had the physicists Albert Einstein and Leo Szilard not in 1939 urged U.S. President Franklin Roosevelt to develop a nuclear program to counter threats from Nazi Germany.

“If it weren’t for those two immigrants, who knows if we would be sitting in this room,” Buffett said.