#n33b. [ZBWR1B]Area = ?

[ZBWR1B]Area = ?

Area = ?

Problem Statement

Given four coordinate points (X1,Y1,X2,Y2,X3,Y3,X4,Y4)(X_1,Y_1,X_2,Y_2,X_3,Y_3,X_4,Y_4) you are asked to find the area of this quadrilateral, which might be

  • square
  • rectangle
  • Parallelograms
  • trapezoid
  • rhombus

Constraints

  • 0X1,Y1,X2,Y2,X3,Y3,X4,Y410000 \leq X_1, Y_1, X_2, Y_2, X_3, Y_3,X_4,Y_4 \leq 1000
  • The four points AA, BB, CC and DD are not collinear.
  • All input values are integers.

Standard input

The input is given from Standard Input in the following format:

X1,Y1X_1,Y_1 X2,Y2X_2,Y_2 X3,Y3X_3,Y_3 X4,Y4X_4,Y_4 image

Output

Given four coordinate points (X1,Y1,X2,Y2,X3,Y3,X4,Y4)(X_1,Y_1,X_2,Y_2,X_3,Y_3,X_4,Y_4) you are asked to find the area of this quadrilateral

Sample calendar

Sample Input 1

0 2
0 0
2 2
2 0

Sample Output 1

4

Sample Input 2

0 0
4 0
3 2
1 2

Sample Output 2

6

题面翻译

给定四个坐标点 (X1,Y1,X2,Y2,X3,Y3,X4,Y4)(X_1,Y_1,X_2,Y_2,X_3,Y_3,X_4,Y_4),要求你找出这个四边形的面积