Roger and his friends like to play beach volleyball, which is played on a sand court that measures meters (shown in the figure). The court is divided by a net whose height is meters. It is Roger’s turn to serve, and he wants to know how hard he should hit the ball and in what direction. Roger is standing exactly in the middle of the base line (marked with an X in the figure), and the ball is initially meters above the ground. A hit is successful if the ball passes over the net and lands on the opposite side within the bounds of the court.
An integer denoting the number of test cases. Each test case consists of three real numbers describing the initial velocity of the ball. Here, is the velocity along the length of the court, is the velocity along the width of the court (because of symmetry this could be either left or right), and is the vertical velocity. All velocities are measured in ms, and the and velocities are constant, but the velocity is affected by gravity, which is approximately ms.
For each test case, a single line with the number "1" if the hit is successful, and "0" otherwise.
Given initial height and initial vertical velocity , the height of the ball after seconds is , where is gravity.
Input
7 6 1 10 6 2 10 10 1 6 10 2 6 6 1 6 8 1 8 10 1 10
Output
1 0 1 1 0 1 0