The value of y that minimizes the sum of the two distances from (3,5) to (1,y) and from (1,y) to (4,9) can be written as a/b where a and b are coprime positive integers. Find a + b.

38