프로그램 명: isosceles
제한시간: 1 초

[문제 요약] 그림과 같이 세 점이 (0,0),(250,0),(0,25) 인 직각 이등변삼각형에서 변 위에 한 점이 주어질 때 이 직각 삼각형의 면적을 이등분 하는 직선을 그을 때 이 삼각형과 직선이 만나는 점을 구하는 문제


Mirko and Slavko have built a grand new pool in front of their weekend getaway. The pool is an isosceles right triangle, with legs of length 250.

Everything was perfect, girls were coming, the DJ was coming, and the parties were wild. But, a problem arose when they started serving food at the parties. Mirko is vegetarian, while Slavko thinks a party without sausages is no party at all. Therefore they had to divide the pool into two parts. The pool is placed into a coordinate system (as in the figure above) and divided into two parts of equal area by a line segment with both endpoints on the edges of the pool.

Write a program that, given one endpoint of the dividing line segment, calculates the coordinates of the other endpoint.

입력

The first line contains two integers, the coordinates of one endpoint of the dividing line segment. That point will be on one of the edges of the pool.

출력

Output the coordinates of the other endpoint, rounded to two decimal digits.

입출력 예

입력

0 0 

출력

125.00 125.00 

입력

230 20 

출력

0.00 114.13 

입력

0 40 

출력

148.81 101.19 
출처:coci 2008/2009 contest6 2

[질/답] [제출 현황] [푼 후(2)]
[ 채 점 ] [홈으로]  [뒤 로]