def ratio_round(a, b, r_1, r_2):
    """Find the closest pair of numbers satisfying the ratio r_1:r2 to a:b.
    """
    amult = float(a) / r_1
    bmult = float(b) / r_2
    tmult = round((amult + bmult) / 2)
    return r_1 * tmult, r_2 * tmult
