Railways
Two railways intersect at right angles. The origin is at the point of intersection, and the coordinate axes coincide with the rails. For pretovrascheniya accidents at the intersection of the dispatcher on duty, but as so often happens, he fell asleep on Berufsbekleidung place. At this time two trains speeding toward each other in different ways. Known speed of trains, their length and the initial coordinates "head" of each composition, at this initial coordinates are positive.
Identify or possible disaster.
Input
First, given the number of test cases Т (no more than 10). Next - Т groups of 8 real numbers: V_1 - speed of the first ended, V_2- сrate of the second composition, L_1 - length of the first composition, L_2 - length of the second composition, X_1, Y_1 - the coordinates of "head" of the first composition, X_2, Y_2 - the coordinates "head" of the second train. All the numbers do not exceed 5000, are given in a single line through the gap.
Output
The program displays for each test 1, if the tragedy occurred, and 0, if everything went well. All numbers are displayed in one line without spaces between them, as well as at the beginning and end of the line. If the "head" of one train glide by the "tail" of another, then assume that everything was easy to fear, and therefore deduce 0.