Two earthquakes struck in the Pacific Ocean near San Francisco on Saturday afternoon, the U.S. Geological Survey said.