def how_many_squares_in_shape(input_shape, feature_shape, delta):
    """
    Computes the shape of an output layer that can be plugged into the input
    layer with respect to their shapes and the delta

    Parameters;
        `input_shape`: The shape of the input layer

        `feature_shape`: The shape of the feature

        `delta`: The vertical and horizontal offset of the output layers squares

    Returns:
        A pair representing the shape of an output layer that can be plugged
        into the input layer with respect to their shapes and the delta
    """
    # Determine how many output neurons can be connected to the input layer
    # according to the deltas
    t_n, t_m = input_shape
    f_n, f_m = feature_shape
    if t_n < f_n or t_m < f_m:
        raise Exception('Feature shape {} is greater than layer shape {}'.format(\
                                                   feature_shape, input_shape))
    n = int((t_n - f_n) / delta) + ((t_n - f_n) % delta > 0) + 1
    m = int((t_m - f_m) / delta) + ((t_m - f_m) % delta > 0) + 1
    return (n, m)