403221: GYM101081 D Fire Flowers

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Fire Flowerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

In current days a fire flower is not considered a strange thing, since they are famous in some well-known games. In Poland mythology however, fire flowers are mystical flowers of great power, kept by evil spirits. They had this name because they were so bright that it was impossible to look directly into them. Whoever had such flowers was granted the ability to read minds, find hidden treasures and expel evil.

To obtain a fire flower, a person needed to look for it in a forest at midnight, on the eve of Noc Kupały. It bloomed exactly on midnight, and to harvest it, one should draw a circle around it. It may seem an easy task, but the evil spirits tried to distract anyone trying to harvest the flower, and anyone that failed to draw the circle died.

Given two circles, one drawn by the adventures and the other representing the flower, your task is to decide whether the adventurer died or lived to tell the tale and became rich.

Input

The first line has an integer T, the number of test cases.

Each test case is composed of 6 integers in a single line, R1, X1, Y1, R2, X2 and Y2. The circle drawn by the adventurer has radius R1 and center (X1, Y1). The circle that represents the flower has radius R2 and center (X2, Y2).

Limits

  • 1 ≤ T ≤ 103
  • 1 ≤ R1, R2 ≤ 103
  • |X1|, |Y1|, |X2|, |Y2| ≤ 103
Output

For each case print Dead if the adventurer died, or Rich otherwise.

ExampleInput
4
6 -8 2 3 0 0
7 3 4 2 4 5
3 0 0 4 0 0
5 4 7 1 8 7
Output
Dead
Rich
Dead
Rich

Source/Category

加入题单

上一题 下一题 算法标签: