cho.sh
Notes
Loading...

Bouncing Bowling Ball

Time limit

1s

Memory limit

128 MB

Problem

A bowling ball with diameter 20 cm is thrown from the centerline of a bowling lane that is 105 cm wide. The ball is thrown at an angle X degrees from the lane centerline.

Both sides of the lane have bumpers. When the ball touches a bumper, it reflects with the same angle as its angle of incidence. A single pin with diameter 12 cm is placed on the lane centerline, T m away from the point where the ball is thrown.

For each test case, determine whether the ball can touch the pin.

Input

The first line contains the number of test cases N. Each of the next N lines contains the distance T from the ball to the pin and the throwing angle X.

T is a real number in meters and satisfies 16.0 ≤ T ≤ 18.0. X is measured in degrees from the centerline and satisfies 10 ≤ X ≤ 80.

Output

For each test case, print yes if the bowling ball can hit the pin, and no otherwise.