from typing import Tuple


def mean_grad(x: Tuple[float, float]) -> Tuple[float, float]:
    """A manually calculated gradient of the mean with respect to the inputs."""
    return 6 * x[0], 3 * x[1] ** 2