def METHOD_NAME(x, y, medium):
    u = x * medium
    v = y * medium
    s = u - (u - x)
    t = v - (v - y)
    f = x - s
    g = y - t
    l = x * y
    c = ((s * t - l) + s * g + f * t) + f * g
    return l, c