| t | from decimal import Decimal, getcontext | t | from decimal import Decimal, getcontext |
| import re | | import re |
| getcontext().prec = 400 | | getcontext().prec = 400 |
| s = input().strip() | | s = input().strip() |
| numbers = [x.strip() for x in re.split('\\s*,\\s*', s) if x.strip()] | | numbers = [x.strip() for x in re.split('\\s*,\\s*', s) if x.strip()] |
| numbers = [Decimal(x) for x in numbers] | | numbers = [Decimal(x) for x in numbers] |
| x1, y1, x2, y2, x3, y3 = numbers | | x1, y1, x2, y2, x3, y3 = numbers |
| area = abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / Decimal( | | area = abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / Decimal( |
| 2)) | | 2)) |
| if area == area.to_integral(): | | if area == area.to_integral(): |
| print(area.to_integral()) | | print(area.to_integral()) |
| else: | | else: |
| s = format(area, 'f') | | s = format(area, 'f') |
| s = s.rstrip('0').rstrip('.') if '.' in s else s | | s = s.rstrip('0').rstrip('.') if '.' in s else s |
| print(s) | | print(s) |