check whether a number is divisible by each of its digits