Let **ab** be a 2-digit number

DigitSum (ab) = a + b

DigitProduct (ab) = a * b

**N** = 10*a + b – (a + b) = 9*a

**M** = 10*a + b + (a * b)

The numbers 10, 11, 12, … , 19

**N** = 9 = 3^2 is a perfect square

**M** = 10*1 + 3 + (1 * 3) = 16 = 4^2 is a perfect square

Only ab = 13 we get a perfect square

where 10 < ab < 19

With the numbers 40, 41, 42, … , 49

**N** = 9*4 = 36 = 6^2 is a perfect square

With the numbers 90, 91, … , 99

**N** = 9^2 is a perfect square

When ab = 91 we get a perfect square:

**M** = 10*9 + 1 + (9 * 1) = 100 = 10^2 is a perfect square

With the numbers 30, 31, … , 39

**N** = 3^3 is a perfect cube