시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 (추가 시간 없음) 1024 MB29119815967.660%

문제

You live in the Disc District of Flatland and work for the Nearest Convenient Plot Company (NCPC). Your job is to find the nearest convenient plot of land outside of the Disc District to build on.

The Disc District can be described as a disc on a plane with center $(0, 0)$ and some radius $r$. So a point is outside of the Disc District if the (Euclidean) distance from it to the origin is strictly larger than $r$. A point $(x, y)$ on the plane is a convenient plot if $x$ and $y$ are integers.

입력

The only line of the input contains a single integer $r$ ($1 \leq r \leq 10^6$).

출력

The output should contain a single line with two integers, the $x$ and $y$ coordinates of a convenient building location that is closest to the Disc District. If there are more than one answer, output any of them.

예제 입력 1

1

예제 출력 1

1 1

예제 입력 2

8

예제 출력 2

4 7

예제 입력 3

90210

예제 출력 3

69551 57450

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Nordic Collegiate Programming Contest > NCPC 2022 D번

  • 문제를 만든 사람: Bergur Snorrason