A number \( N \) has exactly 24 factors. If \( N \) is a product of three distinct prime numbers \( p, q, \) and \( r \) raised to different positive integer powers \( a, b, \) and \( c \) respectively, find the smallest possible value of \( N \). Let's think step by step and output the final answer within \boxed{}.
user