Simple Calculate


Submit solution

Points: 1 (partial)
Time limit: 1.0s
Memory limit: 98M

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, C, C++, C11, CLANG, CLANGX, Classical, COBOL, Coffee, CSC, D lang, DART, F95, FORTH, Fortrn, GAS32, GO, Haskell, Itercal, Java, kotlin, LEAN, LISP, LUA, MONOVB, Nasm, OCAML, Pascal, Perl, php, PIKE, prolog, Pypy, Python, Ruby 2, RUST, Scala, SCM, SED, SWIFT, TCL, TUR, V8JS, VB, ZIG

In this problem, the task is to read a code of a product 1, the number of units of product 1, the price for one unit of product 1, the code of a product 2, the number of units of product 2 and the price for one unit of product 2. After this, calculate and show the amount to be paid.

Input

The input file contains two lines of data. In each line there will be 3 values: two integers and a floating value with 2 digits after the decimal point.

Output

The output file must be a message like the following example where "Valor a pagar" means Value to Pay. Remember the space after ":" and after "R$" symbol. The value must be presented with 2 digits after the point.

SAMPLE 1

INPUT 1

12 1 5.30

16 2 5.10

OUTPUT 1

VALOR A PAGAR: R$ 15.50

SAMPLE 2

INPUT 2

13 2 15.30

161 4 5.20

OUTPUT 2

VALOR A PAGAR: R$ 51.40

SAMPLE 3

INPUT 3

1 1 15.10

2 1 15.10

OUTPUT 3

VALOR A PAGAR: R$ 30.20


Comments

There are no comments at the moment.