from typing import Tuple


def ae(q: float, Q: float) -> Tuple[float, float]:
    """
    a = (Q + q) / 2
    e = (Q - q) / (2 * a)

    :param q: pericentric distance
    :type q: float
    :param Q: apocentric distance
    :type Q: float
    :return: semi-major axis, eccentricity
    :rtype: (float,float)
    """
    a = (Q + q) / 2
    return a, (Q - q) / (2 * a)