A system for cardiac pacing and defibrillation, the system comprising: at least two electrodes, configured to be placed in contact with a chest of a subject; and circuitry comprising: a control unit; a pacing subsystem; a defibrillation subsystem and a selection relay, wherein the control unit is configured to: receive electro-cardiogram signals from the at least two electrodes; identify a cardiac arrhythmia in the subject based on the received ECG signals; and assess, based on the identified cardiac arrhythmia, whether to apply a pacing signal or a defibrillation signal, wherein the control unit is further configured to: set the position of the selection relay to a path of the pacing subsystem if the identified cardiac arrhythmia is bradycardia or asystole or ventricular tachycardia; shape a mains electrical source signal into a first waveform applicable to a transformer for generating pacing signals; generate the pacing signals by applying the first waveform to the transformer; and apply the pacing signals through the at least two electrodes to the chest of the subject, and wherein the control unit is further configured to: set the position of the selection relay to a path of the defibrillation subsystem if the identified cardiac arrhythmia is ventricular fibrillation; shape the mains electrical source signal into a second waveform applicable to the transformer for generating defibrillation signals; pre-magnetize a transformer core of the transformer, to generate the defibrillation signals by applying the second waveform to the pre-magnetized transformer; and apply the defibrillation signals through the at least two electrodes to the chest of the subject. at least two electrodes, configured to be placed in contact with a chest of a subject; and circuitry comprising: a control unit; a pacing subsystem; a defibrillation subsystem and a selection relay, wherein the control unit is configured to: receive electro-cardiogram signals from the at least two electrodes; identify a cardiac arrhythmia in the subject based on the received ECG signals; and assess, based on the identified cardiac arrhythmia, whether to apply a pacing signal or a defibrillation signal, wherein the control unit is further configured to: set the position of the selection relay to a path of the pacing subsystem if the identified cardiac arrhythmia is bradycardia or asystole or ventricular tachycardia; shape a mains electrical source signal into a first waveform applicable to a transformer for generating pacing signals; generate the pacing signals by applying the first waveform to the transformer; and apply the pacing signals through the at least two electrodes to the chest of the subject, and wherein the control unit is further configured to: set the position of the selection relay to a path of the defibrillation subsystem if the identified cardiac arrhythmia is ventricular fibrillation; shape the mains electrical source signal into a second waveform applicable to the transformer for generating defibrillation signals; pre-magnetize a transformer core of the transformer, to generate the defibrillation signals by applying the second waveform to the pre-magnetized transformer; and apply the defibrillation signals through the at least two electrodes to the chest of the subject. receive electro-cardiogram signals from the at least two electrodes; identify a cardiac arrhythmia in the subject based on the received ECG signals; and assess, based on the identified cardiac arrhythmia, whether to apply a pacing signal or a defibrillation signal, wherein the control unit is further configured to: set the position of the selection relay to a path of the pacing subsystem if the identified cardiac arrhythmia is bradycardia or asystole or ventricular tachycardia; shape a mains electrical source signal into a first waveform applicable to a transformer for generating pacing signals; generate the pacing signals by applying the first waveform to the transformer; and apply the pacing signals through the at least two electrodes to the chest of the subject, and wherein the control unit is further configured to: set the position of the selection relay to a path of the defibrillation subsystem if the identified cardiac arrhythmia is ventricular fibrillation; shape the mains electrical source signal into a second waveform applicable to the transformer for generating defibrillation signals; pre-magnetize a transformer core of the transformer, to generate the defibrillation signals by applying the second waveform to the pre-magnetized transformer; and apply the defibrillation signals through the at least two electrodes to the chest of the subject. set the position of the selection relay to a path of the defibrillation subsystem if the identified cardiac arrhythmia is ventricular fibrillation; shape the mains electrical source signal into a second waveform applicable to the transformer for generating defibrillation signals; pre-magnetize a transformer core of the transformer, to generate the defibrillation signals by applying the second waveform to the pre-magnetized transformer; and apply the defibrillation signals through the at least two electrodes to the chest of the subject.