Coherent perfect absorption in a coupled electric-magnetic-resonator system