A ladder is placed against a building so that it reaches 35 feet up the side of the building when its base is 12 feet from the base of the building. How long is the ladder?