Syrian Hamsters will not usually tolerate the company of another hamster once they reach approximately 8-10 weeks of age and so Syrian hamsters should be housed separately - one hamster, one cage. If Syrian Hamsters are not housed separately serious fighting and injury can occur.
Dwarf Hamsters are sociable and will live happily in pairs or groups of mixed or single sexes. However, they are best introduced at a young age. When buying two or more Dwarf Hamsters to live together it is not necessary to get hamsters from the same litter but they should be roughly the same age and size (and sex if you do not want to breed them) and should have been living in a group community when bought. They may squabble a little when first introduced but the squabbling often sounds worse than it actually is and is just their way of establishing who is the boss. They are best left to sort this out unless serious injury or prolonged non-stop fighting occurs.