Measurement of (anti)deuteron and (anti)proton production in DIS at HERA