Bobby is in a very sticky situation. His integration test is scheduled for tomorrow but he hasn't studied at all! As such, he decides to bribe his math teacher to delay his math test. However, his math teacher does not accept bribes. Instead, he asks Bobby to solve a math problem for him. He gives him three coordinates , , and . These represent the coordinates of the points of a triangle. His teacher asks him to solve for the area of the triangle. You need to write a program to help him!
Helpful Formulas:
- The distance between two points and is given by the formula: .
- If are the side lengths of a triangle, its area is given by Heron's formula: , where .
Constraints
Subtask 1 [20%]
The points are guaranteed to form a right triangle (i.e. a triangle containing a degree angle), such that two of the sides are parallel to the and axis respectively.
Subtask 2 [80%]
No additional constraints.
Input Specification
The input consists of three lines: each line contains two space-separated integers, and , representing one of the coordinates of the triangle.
Output Specification
Output should consist of a single floating point (decimal) value, giving the area of the triangle. Since there is a possibility of decimal values, the answer will be marked as correct if it has an absolute or relative error of at most .
Sample Input
0 0
6 0
0 7
Sample Output
21
Explanation of Sample
It can be shown using Heron's formula that the area of the triangle is units.
Comments