#K49287. Liters to Milliliters Conversion

    ID: 28609 Type: Default 1000ms 256MiB

Liters to Milliliters Conversion

Liters to Milliliters Conversion

You are given a volume in liters expressed as a fraction (in the form a/b or -a/b), and your task is to convert it into milliliters. The output should also be represented as a fraction in its lowest terms.

Recall that 1 liter = 1000 milliliters. Thus, if the input fraction is \(\frac{a}{b}\), you should compute \(\frac{1000a}{b}\) and then reduce the fraction to its simplest form.

Input Format: The input consists of a single line containing a fractional number in the form a/b.

Output Format: Print the exact result in milliliters as a fraction in lowest terms, in the form numerator/denominator.

Examples:

  • Input: 1/1 → Output: 1000/1
  • Input: 3/2 → Output: 1500/1
  • Input: -7/4 → Output: -1750/1

inputFormat

The input is read from standard input (stdin) and consists of a single line that contains a fraction in the form a/b, where a and b are integers. The fraction may be negative.

outputFormat

The output should be printed to standard output (stdout) as a fraction in the form numerator/denominator representing the converted volume in milliliters in its lowest terms.

## sample
1/1
1000/1