What is the prime factor for 18 and 24?

2 x 3 x 3 = 18
2 x 2 x 2 x 3 = 24