ABS and ESP have overlapping functionality, and they usually both stop working if there's a fault with the system.
The three most common causes are low voltage (weak battery or faulty alternator), or a faulty Steering Wheel Position Sensor (aka 'clock spring'), or a failed wheel speed sensor.
Other issues relating to the wheel speed sensor are also possible causes, e.g. corrodes stroboscopic ring or chaffed sensor wires.
The only way to work out what has failed is by reading the fault codes using STAR (or iCarsoft, if DIY).
PS - Check also that the tyres are inflated correctly, significant differences in tyre pressures can confuse the system.