Assuming they are PS/2...
Are they in the right port, PS/2 mice and keyboards use the same connector; you need to get the keyboard in the keyboard port and the mouse in the mouse port.
Second, PS/2 is not hot swappable, if you unplug and or plug in a ps/2 keyboard or mouse when the system is on, you can damage the motherboard and ruin the ps/2 ports.
http://en.wikipedia.org/wiki/PS/2_connector
Try to gently tweak the connector to one side; it may be loose connections, other than that, buy a new USB keyboard and mouse.