Problems
429 - Algebraic Expression (III)
SUBMIT PROBLEM

Algebraic Expression (III)

Time Limit: 1 sec

 

The Problem

 If a + b + c = X and a2 + b2 + c2 = Y, what is the value of ab + bc + ac ?

 

Example

If a + b + c = 15 and a2 + b2 + c2 = 83 then

ab + bc + ac = 71

 

The Input

Input file contain a series of line, each line contains two integer numbers X and Y (0<X,Y<100).

 

The Output

For each line of input, output will show one integer numbesr which is the value of ab + bc + ac in a separate line.

 

Sample Input

15 83

11 1

 

Sample Output

71

60

 

 

 

 

 

Problem Setter: Shahin ShamS