A characterization of signed discrete infinitely divisible distributions