import java.util.Scanner;public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ double n = sc.nextDouble(); double sum = n+2; for(double i=n;i>=1;i--){ sum=i+(i+1)/sum; } System.out.println(1/sum); //要注意最前面的 1 ,不要被坑 System.out.println(String.format("%.5f", 1/sum)); } }}