Yes, you can apply for both the posts. However, make sure that you mention the appropriate preference of post/department, as your preference will be considered FINAL and IRREVERSIBLE during the selection process. Moreover, the commission makes the final allotment of post based on the merit preference of Post/ Departments given by the candidates and no change is considered or made by the commission.