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 suitable rotation, a brick of dimensions $a_1 \times a_2 \times a_3$ can be enclosed in a box of dimension $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?
There is a total of $P(1000,6)$ possible ordered $6$-tuples $(a_1,a_2,a_3,b_1,b_2,b_3).$
There are $C(1000,6)$ possible sets $\{a_1,a_2,a_3,b_1,b_2,b_3\}.$ We have five valid cases for the increasing order of these six elements:


$aaabbb$
$aababb$
$aabbab$
$abaabb$
$ababab$

Note that the $a$'s are different from each other, as there are $3!=6$ ways to permute them as $a_1,a_2,$ and $a_3.$ Similarly, the $b$'s are different from each other, as there are $3!=6$ ways to permute them as $b_1,b_2,$ and $b_3.$
So, there is a total of $C(1000,6)\cdot5\cdot6^2$ valid ordered $6$-tuples. The requested probability is \[p=\frac{C(1000,6)\cdot5\cdot6^2}{P(1000,6)}=\frac{C(1000,6)\cdot5\cdot6^2}{C(1000,6)\cdot6!}=\frac14,\] from which the answer is $1+4=\boxed{005}.$
~MRENTHUSIASM