You pick up the hamster carefully and lay the hamster on his/her back. If you see two holes close together, its a girl. If you see one hole and one you know what, its a boy. Hope this helps!
The male hamster and the female hamster both have two pink dots. The males dots are more far apart if you cant figure it out go to a vet or pet store worker.