Product of digits = n^{2 }– 15n – 27

= n(n – 15) – 27

Note that if n is a more than 2-digit number, say 3-digit number, then product has to be ≤ 9 × 9 × 9 = 729 but (n(n – 15) – 27) is more than 729 (in fact it a more than 3-digit numbers for any 3-digit n). Hence, n can be either one-digit or 2-digit.

If n is 1-digit then n^{2} – 15n – 27 = n