def all_increasing(distances, past_distances):
    """Check if particles distances are all increasing."""
    for particle_number, distance in distances.items():
        if distance < past_distances[particle_number]:
            return False
    return True