1993 AIME Problem 7

Three numbers, a_{1}, a_{2}, a_{3}, are drawn randomly and without replacement from the set \{1,2,3, \ldots, 1000\}. Three other numbers, b_{1}, b_{2}, b_{3}, are then drawn randomly and without replacement from the remaining set of 997 numbers. Let p be the probability that, after a suitable rotation, a brick of dimensions a_{1} \times a_{2} \times a_{3} can be enclosed in a box of dimensions b_{1} \times b_{2} \times b_{3}, with the sides of the brick parallel to the sides of the box. If p is written as a fraction in lowest terms, what is the sum of the numerator and denominator?