f | s = input() | f | s = input() |
n | x_hi = y_hi = z_hi = float('-inf') | n | x_up = y_up = z_up = -float('Inf') |
| x_lo = y_lo = z_lo = float('inf') | | x_down = y_down = z_down = float('Inf') |
| while s != '': | | while s != '': |
| (x, y, z) = map(float, s.split(',')) | | (x, y, z) = map(float, s.split(',')) |
n | if x > x_hi: | n | if x > x_up: |
| x_hi = x | | x_up = x |
| if x < x_lo: | | if x < x_down: |
| x_lo = x | | x_down = x |
| if y > y_hi: | | if y > y_up: |
| y_hi = y | | y_up = y |
| if y < y_lo: | | if y < y_down: |
| y_lo = y | | y_down = y |
| if z > z_hi: | | if z > z_up: |
| z_hi = z | | z_up = z |
| if z < z_lo: | | if z < z_down: |
| z_lo = z | | z_down = z |
| s = input() | | s = input() |
t | print((x_hi - x_lo) * (y_hi - y_lo) * (z_hi - z_lo)) | t | print((x_up - x_down) * (y_up - y_down) * (z_up - z_down)) |