River
Every day at the Monastery of the Bright Moon, a morning ritual is performed, which is a vital part of each monk's spiritual journey. During this ritual, one monk must leave the Monastery, travel to the Matsang River (the source of the Brahmaputra), collect water, and bring it back to the Temple of the Sun of Dharma, located near the Monastery. This ritual must be completed precisely at dawn.
To ensure this precision, the monks need to determine the shortest path from the Monastery to the Temple, passing through the Matsang River. You have been asked to assist the Monastery of the Bright Moon in calculating this path's length. Since the river near the Monastery is relatively straight, you can treat it as a perfect line and ignore its width. However, it's crucial to remember that the Matsang is a mountainous and treacherous river, making it impossible to cross by wading. Naturally, neither the Monastery nor the Temple is situated within the river.
Input
The first line contains the coordinates of the Monastery, and the second line contains the coordinates of the Temple. The third line provides the numbers k and b—coefficients that define the river's equation (y = kx + b). All numbers, except for k, are integers and do not exceed 10000 in absolute value. The coefficient k is a real number that does not exceed 100 in absolute value.
Output
Output one real number, rounded to three decimal places, representing the length of the shortest path. If it is impossible for the monk to reach the Temple, output "No solution.".