import math


def get_mux_dimensions(I, max_height):
    """Finds the row and column count for the given mux.

    Parameters
    ----------
    I : int
        Input count.
    max_height : int
        Maximum height in gate pitches.

    Returns
    -------
    Tuple[int]
        Row and column count.
    """
       
    col_cnt = int(min(max_height / 2.0, math.ceil(I ** 0.5)))
    row_cnt = int(math.ceil(I / float(col_cnt)))

    return row_cnt, col_cnt