eolymp
bolt
Try our new interface for solving problems
Problems

Vasyas triangles

Vasyas triangles

Vasya built an equilateral triangle with sides equal to \textbf{1}, called him and arranged \textbf{A_1B_1C_1} one side of the axis \textbf{OX} so that its midpoint located exactly at the origin and the vertex \textbf{A_1} was placed on the positive half-\textbf{OY}. Each subsequent Vasin equilateral triangle has a length of exactly \textbf{2} more to the right and placed last, so that one of the peaks coincides with the \textbf{OX} axis at right top of the previous triangle and vertex \textbf{A_n} available in the upper half. \includegraphics{https://static.e-olymp.com/content/37/372423a028820e6440f1af14b443fa1bd10b95fd.jpg} Vasya now interested in the question: \textit{what are the coordinates of a vertex} \textbf{A_n} \textbf{n}-\textit{th triangle?} Help him. \InputFile The single line of input file specified number of triangle \textbf{n} (\textbf{1} ≤ \textbf{n} ≤ \textbf{10^4}). \OutputFile In a single line of output file output with three characters after the decimal point vertex coordinates \textbf{A_n} \textbf{X_n} and \textbf{Y_n} are interested Vasya triangle, separated by one space.
Time limit 1 second
Memory limit 64 MiB
Input example #1
2
Output example #1
2.000 2.598
Author Анатолий Присяжнюк
Source Open and Distance Olympiads 2011-2012