Problem: Let $S$ be the set of points whose coordinates $x,$ $y,$ and $z$ are integers that satisfy $0\le x\le2,$ $0\le y\le3,$ and $0\le z\le4.$ Two distinct points are randomly chosen from $S.$ The probability that the midpoint of the segment they determine also belongs to $S$ is $m/n,$ where $m$ and $n$ are relatively prime positive integers.  Find $m + n.$

Solution: There are $(2 + 1)(3 + 1)(4 + 1) = 60$ points in total. Note that in order for the midpoint of the line segment to be a lattice point, the lengths on the x, y, and z axis must be even numbers. We will define all segments by denoting the amount they extend in each dimension: $(x, y, z)$ . For example, the longest diagonal possible will be $(2,3,4)$ , the space diagonal of the box. Thus, any line segment must have dimensions that are even. For $x$ the segment may have a value of $0$ for $x$ , (in which case the segment would be two dimensional) or a value of $2$ . The same applies for $y$ , because although it is three units long the longest even integer is two. For $z$ the value may be $0$ $2$ , or $4$ . Notice that if a value is zero, then the segment will pertain to only two dimensions. If two values are zero then the line segment becomes one dimensional.
Then the total number of possibilities will be $2 \cdot 2 \cdot 3$
Listing them out appears as follows:
$2,2,4$
$2,2,2$
$2,2,0$
$2,0,4$
$2,0,2$
$2,0,0$
$0,2,4$
$0,2,2$
$0,2,0$
$0,0,4$
$0,0,2$
$0,0,0$ * this value is a single point
Now, picture every line segment to be the space diagonal of a box. Allow this box to define the space the segment occupies. The question now transforms into "how many ways can we arrange this smaller box in the two by three by four?".
Notice that the amount an edge can shift inside the larger box is the length of an edge of the larger box (2, 3, or 4) minus the edge of the smaller box (also known as the edge),  plus one. For example, (0, 2, 2) would be $3 \cdot 2 \cdot 3$ . Repeat this process.
$2,2,4$
$2,2,2$
$2,2,0$ 10
$2,0,4$
$2,0,2$ 12
$2,0,0$ 20
$0,2,4$
$0,2,2$ 18
$0,2,0$ 30
$0,0,4$ 12
$0,0,2$ 36
$0,0,0$ 60 * this won't be included, but notice that sixty the number of lattice points
Finally, we remember that there are four distinct space diagonals in a box, so we should multiply every value by four, right? Unfortunately we forgot to consider that some values have only one or two dimensions. They should be multiplied by one or two, respectively. This is because segments with two dimensions are the diagonals of a rectangle and thus have two orientations. Then any value on our list without any zeroes will be multiplied by four, and any value on our list with only one zero will be multiplied by two, and finally any value on our list with two zeroes will be multiplied by one:
$2,2,4$ 2 8
$2,2,2$ 6 24
$2,2,0$ 10 20
$2,0,4$ 4 8
$2,0,2$ 12 24
$2,0,0$ 20 20
$0,2,4$ 6 12
$0,2,2$ 18 36
$0,2,0$ 30 30
$0,0,4$ 12 12
$0,0,2$ 36 36
$0,0,0$ 60 * it's nice to point out that this value will be multiplied by zero
add every value on the rightmost side of each term and we will receive $230$ . Multiply by two because each segment can be flipped, to receive $460$ . There are $60 \cdot 59$ ways to choose two distinct points, so we get \[\dfrac{460}{60 \cdot 59} = \dfrac{23}{3 \cdot 59} = \dfrac{23}{177},\] for our answer of $23 + 177 = \boxed{200}$

Answer:  200