check with your ballast manufacturer.
Alot of manufacturers ballasts are capable of running both.
I wasnt too sure about my Magnetic century grow systems ballast so i got my hydro store to check for me and then confirmed that i can run any wattage of any bulb up to the maximum of my ballast whether thats HPS or MH i have a 600w HPS ballast.
If you email your manufacturer they should be able to tell you.
Sometimes you need to use a conversion bulb in order to run both as some HPS ballasts do not have the capability to fire an MH lamp and vice versa.
As i said though if you check with your manufacturer they will be able to give you confirmation as to whether or not their ballast will work with the lamp you have in mind.
J