Problem O
Icarus
Icarus they say, flew too close to the sun. With wax wings built by his father Daedalus, he flew high in the sky and the sun’s heat melted his wings. It’s not actually known though if he did fly too close, and you’re hoping to find out!
We can assume the historic flight takes place on a 2d plane, and treat Icarus as a point moving along a straight line, with the sun as a perfect sphere of radius $R$ centered at $x, y$. (Turns out the gods aren’t fans of complicated math.) From what the ancient text’s say, flying within a distance $D$ of the sun would melt his wings. Additionally, his flight path is known; it is the infinite line given by all points $(x,y)$ satisfying a linear equation of the form $ax + by + c = 0$. Lets hope the story is wrong and Icarus indeed made it!
Input
The input consists of two lines, the first containing the values $D$ ($0 \le D \le 10^3$), $R$ ($0 < R \le 10^3$), and $x, y$ ($-10^3 \le x, y \le 10^3$). The second line consists of the values $a, b, c$ ($-10^3 \le a, b, c \le 10^3$). All values are given with exactly one digit after the decimal.
You are guaranteed that at least one of $a$ or $b$ is not zero. You are also guaranteed that the input will be such that the answer to this problem would not change if $R$ was increased or decreased by $0.001$.
Output
Return the string icarus lives on if his flight never takes him within $D$ of the surface of the sun, or his wings melted if he did indeed fly too close.
| Sample Input 1 | Sample Output 1 |
|---|---|
1.0 1.0 3.0 4.0 0.5 -1.0 -1.0 |
icarus lives on |
| Sample Input 2 | Sample Output 2 |
|---|---|
1.0 2.0 -2.0 3.0 1.0 0.0 0.0 |
his wings melted |
| Sample Input 3 | Sample Output 3 |
|---|---|
1.0 1.0 3.0 4.0 1.0 -1.0 0.0 |
his wings melted |
| Sample Input 4 | Sample Output 4 |
|---|---|
2.0 2.0 -2.0 3.0 2.0 -1.0 1.0 |
his wings melted |
