아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Disc District

면접 대비

시간 제한3초메모리 제한1024 MB

요약
반지름 r이 주어질 때, 원점을 중심으로 하는 반지름 r인 원 바깥에 있으면서 원점에 가장 가까운 정수 좌표 점을 찾는다.
난이도

보통10점 중 4점

유형
수학, 기하, 완전 탐색
정답자
아직 제출이 없습니다

문제

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)(0, 0) and some radius rr. So a point is outside of the Disc District if the (Euclidean) distance from it to the origin is strictly larger than rr. A point (x,y)(x, y) on the plane is a convenient plot if xx and yy are integers.

입력

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

출력

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

예제3

  1. 예제 1

    입력
    1
    
    예상 출력
    1 1
    
  2. 예제 2

    입력
    8
    
    예상 출력
    4 7
    
  3. 예제 3

    입력
    90210
    
    예상 출력
    69551 57450