Which among the following compounds are formed when an alkali metal reacts with hydrogen and halogen respectively?