The men book a quarter-final slot in the Thomas Cup and play Japan next to fight for the top spot in Group B.