def manhattan_distance(xy_a, xy_b):
    """
    Number of steps between two squares allowing only
    up, down, left and right steps.
    """
    x_a, y_a = xy_a
    x_b, y_b = xy_b
    return abs(x_a-x_b) + abs(y_a-y_b)