#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e15;
const long long int mod = 1000000007;
const int infInt = 1e9;
const double PI = acos(-1.00);
const double eps = 1e-6;
string H = "Hermione";
string R = "Ron";
long long int gcd(long long int a, long long int b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(NULL);
  long long int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  if (a == 0 and b != 0 and c != 0 and d != 0)
    cout << R << "\n";
  else if (d > 0 and c == 0)
    cout << R << "\n";
  else if (f == 0)
    cout << H << "\n";
  else if (e == 0 and a != 0 and b != 0 and c != 0 and d != 0)
    cout << R << "\n";
  else if (d == 0)
    cout << H << "\n";
  else if (c == 0)
    cout << R << "\n";
  else if (b == 0)
    cout << H << "\n";
  else if (a == 0)
    cout << R << "\n";
  else {
    long long int x = lcm(b, c);
    long long int k = x / b;
    a *= k;
    k = x / c;
    d *= k;
    b = c = x;
    long long int y = lcm(d, e);
    long long int m = y / d;
    a *= m;
    b *= m;
    c *= m;
    m = y / e;
    f *= m;
    d = e = y;
    (f > a) ? cout << R << "\n" : cout << H << "\n";
  }
}
