HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Triangle2

Guest
• Discussion of problem (1)

Section problems

• Variant 30
• Variant 4
• Variant 5
• Variant 6
• Variant 7
• Variant 8
• Variant 9
• Variant 15
• Triangle2
• Santa Gifts
• Chessboard Pattern
• Two Sets
• Coin Piles
• Apartments
• Bit Strings
• Repetitions
• D. Love-Hate

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/2000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Problem description

You are given a triangle and number S. Find 3 points on sides of given triangle so that its area equals to S.

Input

On the first line there are 6 integer values x1, y1, x2, y2, x3, y3 – coordinates of triangle, their absolute value <=1000. On the second line integer value of S, 0<=S<=109.

Output

If there isn’t any 3 points on the sides of triangle then write “No solution”. Otherwise write coordinates of found 3 points. Area of found triangle must not differ more than 10-7 from S.

Example

stdin stdout

0 0 7 0 0 7
6

3.0 0.0
3.0 4.0
0.0 4.0

0 0 3 0 0 4
7

No solution

Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî âûïîëíèòü âõîä.

www.contester.ru