Problems
559 - Fibonacci Roots
SUBMIT PROBLEM

Fibonacci Roots

Time Limit: 0.5 sec

 

The Problem

The first two terms in the Fibonacci sequence are 0 and 1, respectively, and each subsequent term is the sum of the previous two. Using this definition to calculate the first several terms in the sequence, we get

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...

Let us define the Fibonacci roots of a positive integer n to be the two smallest consecutive Fibonacci numbers whose sum is greater than or equal to n.

 

Write a program that, given as input a positive integer, produces as output its Fibonacci roots.

 

The Input

The input file contains several lines of input. Each line contains one positive integer number n(0<=n<5*1018). Input is terminated by end of file (EOF).

 

The Output

Your output should print a single line for each line of input. For each line, print the Fibonacci roots.

 

Sample Input

41

13

 

Sample Output

21 34

5 8

 

 

 

 

Problem Setter: Shahin ShamS