The n-Dimensional Cities

In an n-dimensional space there can be maximum (n + 1) points that are equidistant from one another. The n-Dimensional creatures of country Talisman has build (n + 1) cities which are equidistant from each other. The roads of Talisman are built according to the following rules:

  1. Every city is reachable from every other city via road.
  2. A road segment only connects two different cities.
  3. There is no more than one direct road segment between two cities.
  4. If you take any arbitrary city you will find that no neighboring city of it is directly connected. Two cities A and B are neighboring if and only if they have a direct road segment between them. If two neighboring city of A, is B and C then B and C will never be neighbors. This is done to ensure security (to reduce alternate paths).
  5. Road segments that connect two neighboring cities are either straight or circular. The circular road segments are actually part of a circle whose center is d miles away from both the cities. Here d ≥ 0.5∗(linear distance of the two cities). In Talisman maximum 50% roads are circular and circular roads are never more than straight roads in number.
  6. You can assume that no two road segments intersect. The Communication Minister of Talisman wants to build as many road segments as possible (pre- serving the constraints above) and the Nature Minister wants the roads to be as long as possible as he plants trees on both sides of the roads. From a given description of Talisman you’ll have to find the number of road segments in Talisman and also the total length of road segments. Input The input file contains several lines of input. Each line contains three integers dim (The Dimension of the World), dist (The linear distance between any two cities) and d (Explained in the problem statement above). Note that dim is a positive integer less than 10000, (0 < dist ≤ 10000) and dist ≤ d < 10000. 2.0 Output For each line of input you should give one line of output which contains two numbers. The first round number denotes the number of road segments and the second round number denotes the total length of the road segments (The total actual length rounded to the nearest integer). Sample Input 2 10 10 356 Sample Output 2 20 4 20