One straight beam passes through the origin with direction ratios (1,2,3), and another passes through (1,2,1) with direction ratios (2,1,1). Lengths are in metres. The shortest distance between the beams is d metres. A designer wants a whole-number check on the layout, so she asks for the value of 35d2. What is it?