{"raw_statement":[{"iden":"problem statement","content":"Consider an analog clock whose hour and minute hands are $A$ and $B$ centimeters long, respectively.\nAn endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands $12$ hours and $1$ hour to make one full rotation, respectively.\nAt $0$ o'clock, the two hands overlap each other. $H$ hours and $M$ minutes later, what is the distance in centimeters between the unfixed endpoints of the hands?"},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq A, B \\leq 1000$\n*   $0 \\leq H \\leq 11$\n*   $0 \\leq M \\leq 59$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$ $B$ $H$ $M$"},{"iden":"sample input 1","content":"3 4 9 0"},{"iden":"sample output 1","content":"5.00000000000000000000\n\nThe two hands will be in the positions shown in the figure below, so the answer is $5$ centimeters.\n![image](https://img.atcoder.jp/ghi/when_a_nameless_star_falls_into_the_sky.png)"},{"iden":"sample input 2","content":"3 4 10 40"},{"iden":"sample output 2","content":"4.56425719433005567605\n\nThe two hands will be in the positions shown in the figure below. Note that each hand always rotates at constant angular velocity.\n![image](https://img.atcoder.jp/ghi/when_flower_petals_flutter.png)"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}