#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[9], b[9];
  while (cin >> a[0]) {
    b[0] = a[0];
    bool ok = true, gold = false;
    for (int i = 1; i < 6; i++) cin >> a[i];
    bool zero = false;
    for (int i = 0; i < 6; i++)
      if (a[i] == 0) zero = true;
    bool ron;
    if (zero) {
      if (a[2] == 0 && a[3] != 0) {
        ron = true;
      } else if (a[3] == 0) {
        ron = false;
      } else {
        if (a[0] == 0 && a[1] != 0) {
          ron = true;
        } else if (a[1] == 0) {
          ron = false;
        } else {
          if (a[4] == 0 && a[5] != 0) {
            ron = true;
          } else if (a[5] == 0) {
            ron = false;
          }
        }
      }
    } else {
      if (a[0] * a[2] * a[4] < a[1] * a[3] * a[5])
        ron = true;
      else
        ron = false;
    }
    if (ron)
      cout << "Ron" << endl;
    else
      cout << "Hermione" << endl;
  }
  return 0;
}
