2X2X4 foot or larger.divided, each with their own setup, that or simply two cages near each other.
Hamsters, unlike other rodents are independent, put together, they may fight for their home.
Syrians especially cannot be housed together.
Some like dwarfs don't need such large cage, they may like a cozy one better.
Just enough room for their amenities, some run around room and enrichment's.
Helps if you can give them a playground for out of cage time, even a bathtub with familiar things from their cage.
Anything they can't easily escape or have a fall.