I want to apply to both the MS and the PhD program, do I need to fill out two separate applications?

No, students who apply to the PhD program are automatically considered for the MS program, should they not get admitted to the PhD program.