Harry Potter and Three Spells

题意翻译

#### 题目描述 很久以前(可能甚至在第一本书中),尼古拉斯·勒梅,一位伟大的炼金术士和魔法石的创造者,教了哈利·波特三个有用的咒语。第一种方法可以将 $a$ 克沙子转换成 $b$ 克铅,第二种方法可以将 $c$ 克铅转换成 $d$ 克金,第三种方法可以将 $e$ 克金转换成 $f$ 克沙子。 当哈利告诉他的朋友这些咒语时,罗恩很惊讶。毕竟,如果他们能把沙子变成铅,铅变成金,然后再把部分金变成沙子,那么就有可能从少量的沙子开始得到大量的金!即是无限量的黄金! 相比之下,格兰杰对这个想法持怀疑态度。她认为,根据物质守恒定律,获得无限量的物质,即使使用魔法,也是不可能的。相反,物质在转化过程中甚至会减少,转化为能量。 虽然赫敏的理论似乎令人信服,罗恩却不相信她。罗恩觉得,赫敏制定了只属于她的物质守恒定律,以阻止哈利和罗恩在这些胡言乱语上浪费时间,并且让他们去做作业。 这就是为什么罗恩已经收集了一定数量的沙子进行实验。 朋友之间的争吵似乎是不可避免的。帮助哈利确定他的朋友中哪一个是对的,避免争吵。要做到这一点,你必须弄清楚是否有可能从有限数量的沙子中获得比任何预先分配黄金数量更多的黄金数量。 --- #### 输入格式 输入共一行,包含 $6$ 个整数,$a,b,c,d,e,f$ $(a,b,c,d,e,f\leq 1000)$。 --- #### 输出格式 如果可以获得无限的黄金,输出`Ron`,否则输出`Hermione`。 --- #### 样例解释 ##### 样例一 如果最初有 $500$ 克沙子,应用第一种法术 $5$ 次,把沙子变成 $1000$ 克铅。然后应用第二个法术 $4$ 次,得到 $600$ 克黄金,把其中 $400$ 克的黄金转化成沙子,得到 $500$ 克沙子和 $200$ 克黄金。对这其中的 $500$ 克沙子进行同样的操作,可以得到无限黄金。所以输出`Ron`。 ##### 样例四 由于得不到任何物质,所以不能得到无限黄金,输出`Hermione`。 ##### 样例五 因为使用第二种法术可以无限凭空得到金子,所以输出`Ron`。 ##### 样例七 用第三种法术,可以凭空得到无限沙子。我们用这种方法先得到 $10000$ 克沙子,然后用第一种法术 $100$ 次获得 $100$ 克铅。用这些铅,可以转化为 $1$ 克黄金。显然,因为沙子数量无限,所以可以得到无限数量的黄金,输出`Ron`。

题目描述

A long time ago (probably even in the first book), Nicholas Flamel, a great alchemist and the creator of the Philosopher's Stone, taught Harry Potter three useful spells. The first one allows you to convert $ a $ grams of sand into $ b $ grams of lead, the second one allows you to convert $ c $ grams of lead into $ d $ grams of gold and third one allows you to convert $ e $ grams of gold into $ f $ grams of sand. When Harry told his friends about these spells, Ron Weasley was amazed. After all, if they succeed in turning sand into lead, lead into gold, and then turning part of the gold into sand again and so on, then it will be possible to start with a small amount of sand and get huge amounts of gold! Even an infinite amount of gold! Hermione Granger, by contrast, was skeptical about that idea. She argues that according to the law of conservation of matter getting an infinite amount of matter, even using magic, is impossible. On the contrary, the amount of matter may even decrease during transformation, being converted to magical energy. Though Hermione's theory seems convincing, Ron won't believe her. As far as Ron is concerned, Hermione made up her law of conservation of matter to stop Harry and Ron wasting their time with this nonsense, and to make them go and do homework instead. That's why Ron has already collected a certain amount of sand for the experiments. A quarrel between the friends seems unavoidable... Help Harry to determine which one of his friends is right, and avoid the quarrel after all. To do this you have to figure out whether it is possible to get the amount of gold greater than any preassigned number from some finite amount of sand.

输入输出格式

输入格式


The first line contains $ 6 $ integers $ a $ , $ b $ , $ c $ , $ d $ , $ e $ , $ f $ ( $ 0<=a,b,c,d,e,f<=1000 $ ).

输出格式


Print "Ron", if it is possible to get an infinitely large amount of gold having a certain finite amount of sand (and not having any gold and lead at all), i.e., Ron is right. Otherwise, print "Hermione".

输入输出样例

输入样例 #1

100 200 250 150 200 250

输出样例 #1

Ron

输入样例 #2

100 50 50 200 200 100

输出样例 #2

Hermione

输入样例 #3

100 10 200 20 300 30

输出样例 #3

Hermione

输入样例 #4

0 0 0 0 0 0

输出样例 #4

Hermione

输入样例 #5

1 1 0 1 1 1

输出样例 #5

Ron

输入样例 #6

1 0 1 2 1 2

输出样例 #6

Hermione

输入样例 #7

100 1 100 1 0 1

输出样例 #7

Ron

说明

Consider the first sample. Let's start with the $ 500 $ grams of sand. Apply the first spell $ 5 $ times and turn the sand into $ 1000 $ grams of lead. Then apply the second spell $ 4 $ times to get $ 600 $ grams of gold. Let’s take $ 400 $ grams from the resulting amount of gold turn them back into sand. We get $ 500 $ grams of sand and $ 200 $ grams of gold. If we apply the same operations to $ 500 $ grams of sand again, we can get extra $ 200 $ grams of gold every time. Thus, you can get $ 200 $ , $ 400 $ , $ 600 $ etc. grams of gold, i.e., starting with a finite amount of sand ( $ 500 $ grams), you can get the amount of gold which is greater than any preassigned number. In the forth sample it is impossible to get sand, or lead, or gold, applying the spells. In the fifth sample an infinitely large amount of gold can be obtained by using only the second spell, which allows you to receive $ 1 $ gram of gold out of nothing. Note that if such a second spell is available, then the first and the third one do not affect the answer at all. The seventh sample is more interesting. We can also start with a zero amount of sand there. With the aid of the third spell you can get sand out of nothing. We get $ 10000 $ grams of sand in this manner. Let's get $ 100 $ grams of lead using the first spell $ 100 $ times. Then make $ 1 $ gram of gold from them. We managed to receive $ 1 $ gram of gold, starting with a zero amount of sand! Clearly, in this manner you can get an infinitely large amount of gold.