What is the smallest positive integer that is both a perfect square and a perfect cube, and also has exactly three distinct prime factors? Let's think step by step and output the final answer within \boxed{}.
user