If these guys are in my house, wearing ski masks and openly carrying firearms, my first assumption is that they are not the average burglars looking for an easy score. That being said, I know the layout of my house better than them, and can navigate in the dark proficiently. So, my objective would be to cut off the route to the second floor while remaining out of sight. Again, I know my house, I know if you go in one door where you have to come out - the perps might not. So, I would try to ambush them, most preferably as they exit a doorway leading into a small hallway. There are no places to hide in a hallway and I wouldn't have to aim at two separate targets. As stated earlier, the only version of this story the police will get is mine.
Now, in reality there would be no ambush in my house, my 75 pound pitbull would probably be on the case long before I arrived!