A 5-digit number is a perfect cube as well as a perfect square. When the number is divided by 4, the result is a perfect square but not a perfect cube. When the number is divided by 27, the result is a perfect cube but not a perfect square. Find the number.