How do you tell if hamsters like each other?

Only one way to know for sure: mate them. After or if they don't do so, the male is likely to attack the female.