Under construction

Still being built. Things may change

TV Size

Interview

Time limit2sMemory limit128 MB

Summary
Given a TV's diagonal length and height-to-width ratio, compute the actual height and width, flooring non-integer results.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Kimtop is shopping for a TV online and learns that a TV's size is described by the diagonal length of its screen. However, even when two TVs have the same diagonal length, their actual height and width can differ depending on the height-to-width ratio.

Kimtop asked the store manager for the actual height and width, but the manager sent only the ratio between the height and the width.

Given the diagonal length of a TV and the ratio of its height to its width, write a program that computes the actual height and width.

Input

The first line contains three integers separated by spaces: the diagonal length D, the height ratio H, and the width ratio W.

Output

Print the actual height and actual width of the TV on the first line, separated by one space.

If the actual height or width is not an integer, print the greatest integer less than or equal to that value. For example, 1.7 is printed as 1.

Constraints

  • 5 ≤ D ≤ 1,000
  • 1 ≤ H ≤ 99
  • 2 ≤ W ≤ 100
  • H < W
  • D, H, and W are integers.

Examples5

  1. Example 1

    Input
    52 9 16
    
    Expected output
    25 45
    
  2. Example 2

    Input
    7 2 3
    
    Expected output
    3 5
    
  3. Example 3

    Input
    13 7 10
    
    Expected output
    7 10
    
  4. Example 4

    Input
    7 32 47
    
    Expected output
    3 5
    
  5. Example 5

    Input
    11 15 16
    
    Expected output
    7 8