← Home
```go
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
)

type Point struct {
	x, y int64
}

func nextInt(scanner *bufio.Scanner) int64 {
	scanner.Scan()
	res := int64(0)
	sign := int64(1)
	for _, b := range scanner.Bytes() {
		if b == '-' {
			sign = -1
		} else if b >= '0' && b <= '9' {
			res = res*10 + int64(b-'0')
		}
	}
	return res * sign
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	
	if !scanner.Scan() {
		return
	}
	
	N := 0
	for _, b := range scanner.Bytes() {
		if b >= '0' && b <= '9' {
			N = N*10 + int(b-'0')
		}
	}
	
	pts := make([]Point, N)
	for i := 0; i < N; i++ {
		pts[i].x = nextInt(scanner)
		pts[i].y = nextInt(scanner)
	}
	
	area2 := int64(0)
	for i := 0; i < N; i++ {
		area2 += pts[i].x*pts[(i+1)%N].y - pts[(i+1)%N].x*pts[i].y
	}
	if area2 < 0 {
		for i, j := 0, N-1; i < j; i, j = i+1, j-1 {
			pts[i], pts[j] = pts[j], pts[i]
		}
	}
	
	pref := make([]int64, N+1)
	for i := 0; i < N; i++ {
		pref[i+1] = pref[i] + (pts[i].x*pts[(i+1)%N].y - pts[(i+1)%N].x*pts[i].y)
	}
	
	angles := make([]float64, 2*N)
	for i := 0; i < 2*N; i++ {
		u1 := float64(pts[i%N].x)
		v1 := float64(pts[i%N].y)
		u2 := float64(pts[(i+1)%N].x)
		v2 := float64(pts[(i+1)%N].y)
		dx := u2 - u1
		dy := v2 - v1
		ang := math.Atan2(dy, dx) - math.Pi/2
		for ang < 0 {
			ang += 2 * math.Pi
		}
		for ang >= 2*math.Pi {
			ang -= 2 * math.Pi
		}
		angles[i] = ang
	}
	for i := 1; i < 2*N; i++ {
		for angles[i] < angles[i-1] {
			angles[i] += 2 * math.Pi
		}
	}
	
	getExtremeVertex := func(beta float64) int {
		for beta < angles[0] {
			beta += 2 * math.Pi
		}
		for beta >= angles[0]+2*math.Pi {
			beta -= 2 * math.Pi
		}
		idx := sort.Search(2*N, func(i int) bool {
			return angles[i] >= beta
		})
		return idx % N
	}
	
	getCapArea := func(L, B int) float64 {
		var pathArea2 int64
		if L <= B {
			pathArea2 = pref[B] - pref[L]
		} else {
			pathArea2 = pref[N] - pref[L] + pref[B]
		}
		cross2 := pts[B].x*pts[L].y - pts[L].x*pts[B].y
		return float64(pathArea2+cross2) * 0.5
	}
	
	computeCornerArea := func(C, S float64) float64 {
		betaL := math.Atan2(S, -C)
		L := getExtremeVertex(betaL)
		
		betaB := math.Atan2(-C, -S)
		B := getExtremeVertex(betaB)
		
		XL := float64(pts[L].x)*C - float64(pts[L].y)*S
		YL := float64(pts[L].x)*S + float64(pts[L].y)*C
		
		XB := float64(pts[B].x)*C - float64(pts[B].y)*S
		YB := float64(pts[B].x)*S + float64(pts[B].y)*C
		
		capArea := getCapArea(L, B)
		
		area := 0.5*(XB-XL)*(YL-YB) - capArea
		if area < 0 {
			area = 0
		}
		return area
	}
	
	minCornerArea := math.Inf(1)
	
	for i := 0; i < N; i++ {
		dx := float64(pts[(i+1)%N].x - pts[i].x)
		dy := float64(pts[(i+1)%N].y - pts[i].y)
		D := math.Hypot(dx, dy)
		
		C1, S1 := dx/D, -dy/D
		area1 := computeCornerArea(C1, S1)
		if area1 < minCornerArea {
			minCornerArea = area1
		}
		
		C2, S2 := -dy/D, -dx/D
		area2 := computeCornerArea(C2, S2)
		if area2 < minCornerArea {
			minCornerArea = area2
		}
	}
	
	fmt.Printf("%.10f\n", minCornerArea)
}
```