The HCF of two numbers is 27 and their LCM is 162. If one of the numbers is 54, what is the other number?