8. The square of the first and last digits of a four-digit number adds up to 13, and the square of the middle two digits adds up to 85. If 1089 is subtracted from this number, the result is a four-digit number written with the same digits but in reverse order. The original four-digit number is $\qquad$
8. 3762