from typing import Iterable
from typing import Tuple


def max_sum(iterable: Iterable[Tuple[int, int]]) -> Tuple[int, int]:
    """
    max() and sum(), but in a single pass.
    """
    current_max = 0
    current_sum = 0
    for (max_value, sum_value) in iterable:
        current_max = max(current_max, max_value)
        current_sum += sum_value
    return (current_max, current_sum)