when you see them squat, make some kind of loud noise(clapping,banging...) or quickly pick them up and take them outside to finish. if those dont work, whenever your dog goes outside and does something, reward them with a treat
to stop peeing on your floor?
You either need to separate them or neuter your male dog.
You can get the male dog neutered, this should stop him from urinating in the house as much as he did.
train them
behave like a dog
Make him wear a dog diaper.
shoot it
I've answered 'how to train a dog to not pee [anywhere]' at this link, same goes for peeing on a rug...How_do_I_House_train_small_dogs
well its natural for a dog to do that but if you can stop it from getting scared by whatever it is then you can stop the pee!
When dogs pee, they are marking their "territory." So by the male peeing on the female he is marking the female as "his."
dont let him in there
If it is already housetrained it has a health problem, or it forgot.