Mouse And Keyboard Freeze Problem

Before I start sorry for my english.My problem is about mouse and keyboard.My mouse is freezing 2-3 second in every minute and my keyboard going off like in 10 min.And finally in 30 min keyboard and mouse go offline,and need to restart.I tried to update drivers,format my pc,and buy a new Motherboard,buy a new mouse nothing changes.Please help me
 
Need to provide a little bit more information before anyone can really help you.
What kind of connection is the Keyboard / Mouse (USB - PS/2 - Wireless)?
What is the make and model of the Motherboard?
What is the make and models of the Keyboard and Mouse?
What Operating System are you using?
 
They are both usb,H61M-P32/w8 MSI is the model of my motherboard,my mouse is logitech g500 and my keyboard is local tech.My OS is win8.1
 
Sorry, been busy last week or so. Have you tried to use a different USB port (example: Normally you plug them into the rear USB ports, and instead you plug them into the front USB ports or different rear USB ports)? Also, have you tried mouse and keyboard on a different computer to ensure that they are functioning correctly?
 
Back