math

Assuming each dimension must be an integer, how
many different rectangular prisms with a volume of
18 cm3 are there?
(A) 2
(B) 3
© 4
(D) 5
(E) 6
I answered “a” but it is “c”. The answer key said c because of the following dimensions : 1,1,18 1,2,9 1,3,6, 3,3,2.
I answered a because I didn’t take the first and last dimensions into consideration since they create a square prism and not rectangular prism. Which one is correct?

squares are in fact rectangles…they are a subset…they are the rectangles with length = width.