In order to fix the issue, check if all cables are plugged into the correct slots. If they are, disconnect all of them, wait for several seconds and then plug them back in. If it doesn't help, test the keyboard and mouse on another PC. If they do not work there as well, you will need to purchase new ones. Check Microsoft Support page for further solutions.