#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (a % b)
    return gcd(b, a % b);
  else
    return b;
}
int main(void) {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int ok = 0;
  if (d == 0) {
    ok = 0;
  } else if (b == 0) {
    if (c == 0)
      ok = 1;
    else
      ok = 0;
  } else if (f == 0) {
    if (a == 0 || c == 0)
      ok = 1;
    else
      ok = 0;
  } else {
    if (a == 0 || c == 0 || e == 0)
      ok = 1;
    else {
      int x = gcd(b, c);
      int y = gcd(d, e);
      int aa = a * c / x * e / y;
      int bb = f * d / y * b / x;
      if (bb > aa)
        ok = 1;
      else
        ok = 0;
    }
  }
  if (ok)
    cout << "Ron" << endl;
  else
    cout << "Hermione" << endl;
  return 0;
}
