Which describes a similarity between Puerto Rico and Guam after the Spanish-American War?

They both achieved independence from the United States.
They both became territories of the United States.
They both remained territories of Spain.
They both achieved independence from Spain.