import java.io.PrintWriter import java.util.* import kotlin.math.* fun PrintWriter.solve() { val x1 = nextInt() val y1 = nextInt() val x2 = nextInt() val y2 = nextInt() val x3 = nextInt() val y3 = nextInt() val dx = arrayOf(1, -1, 0, 0) val dy = arrayOf(0, 0, 1, -1) var max = 0 for (i1 in 0 until 4) { for (i2 in 0 until 4) { for (i3 in 0 until 4) { val nx1 = x1 + dx[i1] val ny1 = y1 + dy[i1] val nx2 = x2 + dx[i2] val ny2 = y2 + dy[i2] val nx3 = x3 + dx[i3] val ny3 = y3 + dy[i3] val area = findArea(nx1, ny1, nx2, ny2, nx3, ny3) max = maxOf(max, area) } } } println(max) } fun findArea(x1: Int, y1: Int, x2: Int, y2: Int, x3: Int, y3: Int): Int { return findArea(x2 - x1, y2 - y1, x3 - x1, y3 - y1) } fun findArea(a: Int, b: Int, c: Int, d: Int): Int { return abs(a * d - b * c) / 2 } fun main() { val writer = PrintWriter(System.out, false) writer.solve() writer.flush() } // region Scanner private var st = StringTokenizer("") private val br = System.`in`.bufferedReader() fun next(): String { while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine()) return st.nextToken() } fun nextInt() = next().toInt() fun nextLong() = next().toLong() fun nextLine() = br.readLine() fun nextDouble() = next().toDouble() // endregion