Number S is equal to the square of the sum of the digits of a $2$ digit number D. If the difference between S and D is $27,$ then D is