Initially, two non-touching spheres of radii R1 and R2 are lying in space at rest. Both of them are then given accelerations a1 and a2 respectively at time=0. Find whether they will ever come in contact. Their initial positions are represented as (x1,y1,z1) and (x2,y2,z2) respectively. Accelerations have respective components in 3D. They are represented as (a1i,a1j,a1k) and (a2i,a2j,a2k) respectively.
The first line contains T, the number of test cases.
Each test case consists of five lines, where the first line contains R1 and R2. The next two lines contain position and acceleration of the first sphere. The next two lines after this contain position and acceleration of the second sphere. All numbers in input are integers.
For each test case, print YES, if the spheres come in contact. Otherwise, print NO (quotes for clarity).
For first testcase, both spheres go in opposite directions, so they'll never come in contact.
For second testcase, second sphere is not moving while first sphere is accelerating towards the second sphere. So they come in contact.