Just to be on the safe side, I would say to get the dogs checked by a vet. One dog might have a UTI and the other might think, "Well Misty is peeing in the house so its okay" (Yes we have one dog, whom I love, but she is a few bricks shy of a load, and when our one dog has accidents, she dogs too. No kidding).
We use Odo Ban (I've gotten it at Costco before, but 1 gal lasts a long time, so you might have to search for it online). If it's carpet, you'll have to steam clean it, or pull up the rug and throw it out (if that's possible).
I agree with the others that say to crate them or confine them in a very small area on either linoleum, tile or laminate floor (easy clean up), and start them back at Potty Training 101. If you don't have the time to devote to it, then put them outside during the day (make sure they have shade and water, and do expect that they may dig out of boredom), and crated at night or when you can't be with them.