A spy number is a natural number whose sum of digits is equal to the product of its digits. For example, 123 is a spy number because 1+2+3=1×2×3. (All one-digit natural numbers are spy numbers, since each such number has only one digit.) One day, Muaz started writing spy numbers in his notebook. He noticed that he wrote A two-digit spy numbers, B three-digit spy numbers, C four-digit spy numbers, D five-digit spy numbers and E six-digit spy numbers. Find the sum of the maximum and minimum values among A,B,C,D and E.