AI Jeopardy

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

The robot revolution is finally here, albeit not quite in the highly explosive way envisioned in various science fiction books and movies. It seems that, perhaps due to a small typo in the AI source code, the robots are not taking our lives but instead taking our livelihoods. One early job market fatality in this revolution was the (somewhat niche) occupation as jeopardy player: already in 2011 the Watson computer defeated two legendary but inferior human jeopardy champions.

Nowadays, more and more of Jeopardy's viewers are AIs themselves and as such the show is considering having categories on topics that are more popular with this new number-crunching viewer base.  Focus group testing has revealed that AIs are particularly fond of the "Binomial Coefficients" category.  The premise of this category is that the answer that contestants get is some positive integer XX, and the contestants must respond with a question of the form "What is nn choose kk?" (and this is a correct response if the binomial coefficient nn choose kk equals XX).

Write an AI to play this new Jeopardy category.  If there are several different possible solutions for nn and kk, the AI should choose the most elegant solution, having the smallest value of nn, and of those with the smallest nn it should choose the one with the smallest value of kk.

입력

Input consists of a single integer XX (1X101001 \le X \le 10^{100}).

출력

Output two non-negative integers nn and kk such that the binomial coefficient nn choose kk equals XX, with ties between multiple solutions broken as explained above.