Peter got a new snow blower as a New Year present. Of course, Peter decided to try it immediately. After reading the instructions he realized that it does not work like regular snow blowing machines. In order to make it work, you need to tie it to some point that it does not cover, and then switch it on. As a result it will go along a circle around this point and will remove all the snow from its path.

Formally, we assume that Peter's machine is a polygon on a plane. Then, after the machine is switched on, it will make a circle around the point to which Peter tied it (this point lies strictly outside the polygon). That is, each of the points lying within or on the border of the polygon will move along the circular trajectory, with the center of the circle at the point to which Peter tied his machine.

Peter decided to tie his car to point P and now he is wondering what is the area of ​​the region that will be cleared from snow. Help him.

Input

The first line of the input contains three integers — the number of vertices of the polygon n (<image>), and coordinates of point P.

Each of the next n lines contains two integers — coordinates of the vertices of the polygon in the clockwise or counterclockwise order. It is guaranteed that no three consecutive vertices lie on a common straight line.

All the numbers in the input are integers that do not exceed 1 000 000 in their absolute value.

Output

Print a single real value number — the area of the region that will be cleared. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6. 

Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if <image>.

Examples

Input

3 0 0
0 1
-1 2
1 2


Output

12.566370614359172464


Input

4 1 -1
0 0
1 2
2 0
1 1


Output

21.991148575128551812

Note

In the first sample snow will be removed from that area:

<image>

Source: codeforces | Difficulty: HARD
Tags: Geometry

Sorting


Solutions:
import math
import sys

def calculate_area(n, x, y, vertices):
	r_max = -sys.maxsize
	r_min = sys.maxsize
	last_d = -1
	for v in vertices:
		d = distance_two_points(v, (x, y))
		if d > r_max:
			r_max = d
		if d < r_min:
			r_min = d
	last_v = vertices[0]
	for i in range(1, n):
		(d_min, i_point) = distance_point_to_line(last_v, vertices[i], (x, y))
		if d_min < r_min and is_in_range(i_point, last_v, vertices[i]):
			r_min = d_min
		last_v = vertices[i]
	(d_min, i_point) = distance_point_to_line(last_v, vertices[0], (x, y))
	if d_min < r_min and is_in_range(i_point, last_v, vertices[0]):
		r_min = d_min
	return math.pi * (r_max ** 2 - r_min ** 2)

def distance_two_points(p1, p2):
	return math.sqrt((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2)

def distance_point_to_line(p1, p2, p0):
	a = p2[1] - p1[1]
	b = p1[0] - p2[0]
	c = p2[0] * p1[1] - p2[1] * p1[0]
	dist = math.fabs(a * p0[0] + b * p0[1] + c) / math.sqrt(a ** 2 + b ** 2)
	x_int = (b * (b * p0[0] - a * p0[1]) - a * c) / (a ** 2 + b ** 2)
	y_int = (a * (-b * p0[0] + a * p0[1]) - b * c) / (a ** 2 + b ** 2)
	return (dist, (x_int, y_int))

def is_in_range(i_point, p1, p2):
	x_min = p1[0] if p1[0] <= p2[0] else p2[0]
	x_max = p1[0] if p1[0] > p2[0] else p2[0]
	y_min = p1[1] if p1[1] <= p2[1] else p2[1]
	y_max = p1[1] if p1[1] > p2[1] else p2[1]
	return x_min <= i_point[0] <= x_max and y_min <= i_point[1] <= y_max
(n, x, y) = input().split()
(n, x, y) = (int(n), int(x), int(y))
vertices = [None] * n
for i in range(n):
	(x_i, y_i) = input().split()
	vertices[i] = (int(x_i), int(y_i))
area = calculate_area(n, x, y, vertices)
print(area)


from math import pi

def getl(p1, p2):
	(x1, y1) = p1
	(x2, y2) = p2
	return pow((x1 - x2) ** 2 + (y1 - y2) ** 2, 0.5)

def geth(a, b, c):
	z = getl(c, b)
	return abs((b[1] - c[1]) * a[0] + (c[0] - b[0]) * a[1] + b[0] * c[1] - c[0] * b[1]) / z

def getp(a, b):
	return pow(abs(a ** 2 - b ** 2), 0.5)
(n, x, y) = map(int, input().split())
P = (x, y)
p = [0] * n
for i in range(n):
	p[i] = tuple(map(int, input().split()))
mini = int(2000000000.0)
maxi = 0
for i in range(n):
	if maxi < getl(P, p[i]):
		maxi = getl(P, p[i])
	if mini > getl(P, p[i]):
		mini = getl(P, p[i])
for i in range(-1, n - 1):
	h = geth(P, p[i], p[i + 1])
	t = getp(getl(P, p[i]), h) + getp(getl(P, p[i + 1]), h)
	if t + 0.001 >= getl(p[i], p[i + 1]) >= t - 0.001:
		if h < mini:
			mini = h
print(pi * (maxi ** 2 - mini ** 2))


from math import sqrt, inf, pi

class Point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

def dis(a, b):
	return sqrt((a.x - b.x) ** 2 + (a.y - b.y) ** 2)

def dcmp(x, eps=1e-10):
	return 0 if abs(x) < eps else -1 if x < 0 else 1

def dot(a, b):
	return a.x * b.x + a.y * b.y

def cross(a, b):
	return a.x * b.y - a.y * b.x

def eq(a, b):
	return dcmp(a.x - b.x) == 0 and dcmp(a.y - b.y) == 0
(n, sx, sy) = map(int, input().split())
s = Point(sx, sy)
maxdis = 0
mindis = inf
pts = []
for i in range(n):
	(tx, ty) = map(int, input().split())
	t = Point(tx, ty)
	ds = dis(s, t)
	pts.append(t)
	if ds > maxdis:
		maxdis = ds
for i in range(n):
	a = pts[i]
	b = pts[(i + 1) % n]
	if eq(a, b):
		ds = dis(s, a)
	else:
		v1 = Point(b.x - a.x, b.y - a.y)
		v2 = Point(s.x - a.x, s.y - a.y)
		v3 = Point(s.x - b.x, s.y - b.y)
		if dcmp(dot(v1, v2)) < 0:
			ds = dis(Point(0, 0), v2)
		elif dcmp(dot(v1, v3)) > 0:
			ds = dis(Point(0, 0), v3)
		else:
			ds = abs(cross(v1, v2)) / dis(Point(0, 0), v1)
	if ds < mindis:
		mindis = ds
print('%.6f' % (pi * maxdis ** 2 - pi * mindis ** 2))


from math import pi, sqrt
(n, Px, Py) = map(int, input().split())
r_min = 1000000000000.0
r_max = 0.0
X = []
Y = []
for i in range(n):
	(x, y) = map(int, input().split())
	X += [x - Px]
	Y += [y - Py]
for i in range(n):
	x1 = X[i - 1]
	y1 = Y[i - 1]
	x2 = X[i]
	y2 = Y[i]
	vector_x = x2 - x1
	vector_y = y2 - y1
	normal_x = vector_y
	normal_y = -vector_x
	A = normal_x
	B = normal_y
	C = -1 * A * x1 + -1 * B * y1
	d = C / sqrt(A * A + B * B)
	if (normal_x * y1 - normal_y * x1) * (normal_x * y2 - normal_y * x2) < 0:
		r_min = min(r_min, abs(d))
	else:
		r_min = min(r_min, sqrt(x1 * x1 + y1 * y1), sqrt(x2 * x2 + y2 * y2))
	r_max = max(r_max, sqrt(x1 * x1 + y1 * y1), sqrt(x2 * x2 + y2 * y2))
print(pi * (r_max * r_max - r_min * r_min))


import math

def get_dist(x1, y1, x2, y2, x, y):
	L = (x1 - x2) ** 2 + (y1 - y2) ** 2
	PR = (x - x1) * (x2 - x1) + (y - y1) * (y2 - y1)
	res = True
	cf = PR / L
	if cf < 0:
		cf = 0
		res = False
	if cf > 1:
		cf = 1
		res = False
	xres = x1 + cf * (x2 - x1)
	yres = y1 + cf * (y2 - y1)
	return xres ** 2 + yres ** 2
(n, x, y) = map(int, input().split())
min_r2 = 20000000 ** 2
max_r2 = -1
xy = []
i_min = 0
for i in range(n):
	(curr_x, curr_y) = map(int, input().split())
	curr_x -= x
	curr_y -= y
	xy.append((curr_x, curr_y))
	max_r2 = max(max_r2, curr_x ** 2 + curr_y ** 2)
for i in range(n):
	min_r2 = min(min_r2, get_dist(xy[i - 1][0], xy[i - 1][1], xy[i][0], xy[i][1], 0, 0))
print('%.7f' % ((max_r2 - min_r2) * math.pi))


import math
(n, x, y) = map(int, input().split())
mnd = -1
mxd = -1
ans = [0] * 4
(fx, fy) = (0, 0)
(px, py) = (0, 0)

def intersect(x1, y1, x2, y2, x3, y3):
	x = x2 - x1
	y = y2 - y1
	x3 -= x1
	y3 -= y1
	lsquare = x ** 2 + y ** 2
	t = max(0, min((x * x3 + y * y3) / lsquare, 1))
	px = x * t
	py = y * t
	d = (x3 - px) ** 2 + (y3 - py) ** 2
	return d
for i in range(n):
	(x1, y1) = map(int, input().split())
	dx = x1 - x
	dy = y1 - y
	d = dx ** 2 + dy ** 2
	if mnd == -1 or mnd > d:
		mnd = d
	if mxd == -1 or mxd < d:
		mxd = d
	if i > 0:
		d = intersect(x1, y1, px, py, x, y)
		if mxd < d:
			mxd = d
		if mnd > d:
			mnd = d
	if i > 0:
		(px, py) = (x1, y1)
	else:
		(fx, fy, px, py) = (x1, y1, x1, y1)
d = intersect(x1, y1, fx, fy, x, y)
if mxd < d:
	mxd = d
if mnd > d:
	mnd = d
print('%.6f' % (math.pi * (mxd - mnd)))


import math
(n, px, py) = map(int, input().split())
points = []
for _ in range(n):
	(x, y) = map(float, input().split())
	points.append((x, y))
near = None
far = None
for i in range(-1, n - 1):
	A = points[i]
	B = points[i + 1]
	C = (px, py)
	area = abs(A[0] * (B[1] - C[1]) + B[0] * (C[1] - A[1]) + C[0] * (A[1] - B[1])) / 2
	height = 2 * area / math.hypot(A[0] - B[0], A[1] - B[1])
	A_dist = math.hypot(A[0] - C[0], A[1] - C[1])
	B_dist = math.hypot(B[0] - C[0], B[1] - C[1])
	dist = max(A_dist, B_dist)
	alpha = (B[0] - A[0]) * (C[0] - A[0]) + (B[1] - A[1]) * (C[1] - A[1])
	beta = (A[0] - B[0]) * (C[0] - B[0]) + (A[1] - B[1]) * (C[1] - B[1])
	if alpha < 0 or beta < 0:
		height = min(A_dist, B_dist)
	if near is None or height < near:
		near = height
	if far is None or dist > far:
		far = dist
inner = math.pi * near ** 2
outer = math.pi * far ** 2
print(outer - inner)


s = input().split()
n = int(s[0])
px = int(s[1])
py = int(s[2])
y = []
x = []
for i in range(n):
	s = input().split()
	x.append(int(s[0]) - px)
	y.append(int(s[1]) - py)
l = []
(x0, y0) = (x[-1], y[-1])
for i in range(n):
	l.append(x[i] * x[i] + y[i] * y[i])
	(dx, dy) = (x[i] - x0, y[i] - y0)
	if (x0 * dx + y0 * dy) * (x[i] * dx + y[i] * dy) < 0:
		x0 = x0 * y[i] - x[i] * y0
		l.append(x0 * x0 / (dx * dx + dy * dy))
	(x0, y0) = (x[i], y[i])
a = 3.141592653589793 * (max(l) - min(l))
print(a)


pi = 3.141592653589793
(n, px, py) = [int(i) for i in input().split(' ')]
p = [[int(i) for i in input().split(' ')] for i in range(n)]
p.append(p[0])
b = (p[0][0] - px) ** 2 + (p[0][1] - py) ** 2
(Min, Max) = (b, b)
for i in range(1, len(p)):
	a = (p[i][0] - p[i - 1][0]) ** 2 + (p[i][1] - p[i - 1][1]) ** 2
	c = b
	b = (p[i][0] - px) ** 2 + (p[i][1] - py) ** 2
	an = max(b - a - c, c - a - b)
	if an >= 0:
		if b < Min:
			Min = b
	else:
		tmp = (p[i][0] - px) * (p[i - 1][1] - py) - (p[i - 1][0] - px) * (p[i][1] - py)
		tmp = tmp ** 2 / a
		if tmp < Min:
			Min = tmp
	if b > Max:
		Max = b
print('%.18f' % ((Max - Min) * pi))


import math

def dis(a0, b0, x, y):
	return ((a0 - x) ** 2 + (b0 - y) ** 2) ** 0.5

def minDistance(A, B, E):
	AB = [B[0] - A[0], B[1] - A[1]]
	BE = [E[0] - B[0], E[1] - B[1]]
	AE = [E[0] - A[0], E[1] - A[1]]
	AB_BE = AB[0] * BE[0] + AB[1] * BE[1]
	AB_AE = AB[0] * AE[0] + AB[1] * AE[1]
	reqAns = 0
	if AB_BE > 0:
		y = E[1] - B[1]
		x = E[0] - B[0]
		return (x * x + y * y) ** 0.5
	elif AB_AE < 0:
		y = E[1] - A[1]
		x = E[0] - A[0]
		return (x * x + y * y) ** 0.5
	else:
		(x1, y1, x2, y2) = (AB[0], AB[1], AE[0], AE[1])
		mod = (x1 * x1 + y1 * y1) ** 0.5
		return abs(x1 * y2 - y1 * x2) / mod
(n, x0, y0) = map(int, input().split())
P = [list(map(int, input().split())) for _ in range(n)]
max_ = 0
min_ = float('inf')
for i in range(n):
	p = P[i]
	min_ = min(min_, minDistance(P[i], P[(i + 1) % n], [x0, y0]))
	max_ = max(max_, dis(x0, y0, p[0], p[1]))
print(math.pi * (max_ * max_ - min_ * min_))


import math

def main():
	(n, xp, yp) = (int(x) for x in input().split())
	polygon = [None] * n
	for i in range(n):
		(xi, yi) = (int(x) for x in input().split())
		polygon[i] = (xi, yi)
	print(solver((xp, yp), polygon))

def solver(P, polygon):
	n = len(polygon)
	(xp, yp) = P
	distances = [distance(xp, yp, x, y) for (x, y) in polygon]
	maxDist = max(distances)
	minDist = min(distances)
	for i in range(n):
		p = perpenPoint(polygon[i % n], polygon[(i + 1) % n], P)
		if p != None:
			dist = distance(xp, yp, p[0], p[1])
			if dist < minDist:
				minDist = dist
	area = math.pi * (maxDist ** 2 - minDist ** 2)
	return area

def toLine(point1, point2):
	(x1, y1) = point1
	(x2, y2) = point2
	if x1 == x2:
		if y1 == y2:
			assert False
		else:
			return (1, 0, x1)
	else:
		a = (y2 - y1) / (x1 - x2)
		c = a * x1 + y1
		return (a, 1, c)

def perpenPoint(point1, point2, point):
	line = toLine(point1, point2)
	(a, b, c) = line
	if a == 0:
		(ap, bp) = (b, a)
	else:
		(ap, bp) = (-b / a, 1)
	(x, y) = point
	cp = ap * x + bp * y
	(xi, yi) = intersection(line, (ap, bp, cp))
	(x1, y1) = point1
	(x2, y2) = point2
	if min(x1, x2) <= xi and xi <= max(x1, x2) and (min(y1, y2) <= yi) and (yi <= max(y1, y2)):
		return (xi, yi)
	else:
		return None

def intersection(line1, line2):
	(a1, b1, c1) = line1
	(a2, b2, c2) = line2
	if b1 == 0 and a2 == 0:
		return (c1, c2)
	elif a1 == 0 and b2 == 0:
		return (c2, c1)
	else:
		x = (b2 * c1 - b1 * c2) / (a1 * b2 - a2 * b1)
		y = (c1 - a1 * x) / b1
		return (x, y)

def almostEqual(x, y):
	return abs(x - y) < 10 ** (-16)

def distance(x1, y1, x2, y2):
	leg1 = abs(x1 - x2)
	leg2 = abs(y1 - y2)
	return (leg1 ** 2 + leg2 ** 2) ** 0.5
main()


class Point(object):

	def __init__(self, x, y):
		self.x = float(x)
		self.y = float(y)

def square(x):
	return x * x

def distance_squared(v, w):
	return square(v.x - w.x) + square(v.y - w.y)

def distance_point_segment_squared(p, v, w):
	d2 = distance_squared(v, w)
	if d2 == 0:
		return distance_squared(p, v)
	t = ((p.x - v.x) * (w.x - v.x) + (p.y - v.y) * (w.y - v.y)) / d2
	if t < 0:
		return distance_squared(p, v)
	elif t > 1.0:
		return distance_squared(p, w)
	else:
		proj = Point(v.x + t * (w.x - v.x), v.y + t * (w.y - v.y))
		return distance_squared(p, proj)
(n, x, y) = map(int, input().split())
pt = [tuple(map(int, input().split())) for i in range(n)]
pt = [Point(p[0] - x, p[1] - y) for p in pt]
p0 = Point(0, 0)
mind = float('+inf')
maxd = float('-inf')
for i in range(len(pt)):
	cd = distance_point_segment_squared(p0, pt[i - 1], pt[i])
	mind = min(mind, cd)
	cd = distance_squared(p0, pt[i])
	maxd = max(maxd, cd)
from math import pi
s1 = pi * maxd
s2 = pi * mind
print(s1 - s2)


import math
(n, a, b) = map(int, input().split())
vals = []
for _ in range(n):
	(u, v) = map(int, input().split())
	vals.append((u - a, v - b))
(currX, currY) = vals[-1]
ans = []
for (nextX, nextY) in vals:
	ans.append(nextX * nextX + nextY * nextY)
	dx = nextX - currX
	dy = nextY - currY
	if (currX * dx + currY * dy) * (nextX * dx + nextY * dy) < 0:
		val = currX * nextY - nextX * currY
		ans.append(val * val / (dx * dx + dy * dy))
	currX = nextX
	currY = nextY
print((max(ans) - min(ans)) * math.pi)


import sys
import math

def dist2(x1, y1, x2, y2):
	return (x1 - x2) ** 2 + (y1 - y2) ** 2

def find_dist(x1, y1, x2, y2, X, Y):
	if x2 == x1:
		if min(y1, y2) <= Y <= max(y1, y2):
			return (x1 - X) ** 2
		else:
			return min(dist2(x1, y1, X, Y), dist2(x2, y2, X, Y))
	a = (y2 - y1) / (x2 - x1)
	b = y1 - a * x1
	x = (X + a * (Y - b)) / (1 + a * a)
	if min(x1, x2) <= x <= max(x1, x2):
		return dist2(x, a * x + b, X, Y)
	else:
		return min(dist2(x1, y1, X, Y), dist2(x2, y2, X, Y))

def main():
	(N, X, Y) = map(int, sys.stdin.readline().split())
	maxr = 0
	minr = 10 ** 15
	pts = [tuple(map(int, sys.stdin.readline().split())) for _ in range(N)]
	pts.append(pts[0])
	for i in range(0, len(pts) - 1):
		(x, y) = pts[i]
		r = dist2(x, y, X, Y)
		if r > maxr:
			maxr = r
		r = find_dist(x, y, pts[i + 1][0], pts[i + 1][1], X, Y)
		if r < minr:
			minr = r
	print('%.10f' % (math.pi * (maxr - minr)))
main()


(n, x, y) = map(int, input().split())
p = []
maxp = 0
maxi = 10 ** 100
for i in range(n):
	(x1, y1) = map(int, input().split())
	if (x - x1) ** 2 + (y - y1) ** 2 > maxp:
		maxp = (x - x1) ** 2 + (y - y1) ** 2
	p.append([x1, y1])

def find(x, y, x1, y1, x2, y2):
	global xres, yres
	l = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)
	pr = (x - x1) * (x2 - x1) + (y - y1) * (y2 - y1)
	res = True
	cf = pr / l
	if cf < 0:
		cf = 0
		res = False
	if cf > 1:
		cf = 1
		res = False
	xres = x1 + cf * (x2 - x1)
	yres = y1 + cf * (y2 - y1)
for i in range(n):
	nex = (i + 1) % n
	find(x, y, p[i][0], p[i][1], p[nex][0], p[nex][1])
	if (x - xres) * (x - xres) + (y - yres) * (y - yres) < maxi:
		maxi = (x - xres) * (x - xres) + (y - yres) * (y - yres)
print(3.141592653589793 * (-maxi + maxp))


from math import pi

def vadd(v1, v2):
	return (v1[0] + v2[0], v1[1] + v2[1])

def vsub(v1, v2):
	return (v1[0] - v2[0], v1[1] - v2[1])

def smul(s, v):
	return (s * v[0], s * v[1])

def dot(v1, v2):
	return v1[0] * v2[0] + v1[1] * v2[1]

def vmag2(v):
	return v[0] * v[0] + v[1] * v[1]

def segment_dist2(p, v, w):
	vp = vsub(p, v)
	vw = vsub(w, v)
	l2 = vmag2(vw)
	t = dot(vp, vw) / float(l2)
	if t <= 0:
		proj = v
	elif t >= 1:
		proj = w
	else:
		proj = vadd(v, smul(t, vw))
	return vmag2(vsub(p, proj))

def area(p, q):
	(r2min, r2max) = (None, None)
	qprev = q[-1]
	for qi in q:
		r2 = vmag2(vsub(p, qi))
		sd2 = segment_dist2(p, qi, qprev)
		if r2max is None or r2 > r2max:
			r2max = r2
		if r2min is None or sd2 < r2min:
			r2min = sd2
		qprev = qi
	return pi * (r2max - r2min)
(n, px, py) = map(int, input().split())
q = [tuple(map(int, input().split())) for _ in range(n)]
print(area((px, py), q))


import math

def dot(v1, v2):
	return v1[0] * v2[0] + v1[1] * v2[1]

def cross(v1, v2):
	return v1[0] * v2[1] - v1[1] * v2[0]

def mag(x, y):
	return math.sqrt(x ** 2 + y ** 2)

def main():
	PI = 3.141592653589793
	mags = []
	(n, x0, y0) = map(int, input().split())
	(x, y) = (x0, y0)
	for i in range(n):
		(x_, y_) = map(int, input().split())
		(x_, y_) = (x_ - x0, y_ - y0)
		if i == 0:
			(x1, y1) = (x_, y_)
			(x, y) = (x_, y_)
		mags.append(mag(x_, y_))
		if dot([x, y], [x - x_, y - y_]) * dot([x_, y_], [x_ - x, y_ - y]) > 0:
			mags.append(abs(cross([x, y], [x_ - x, y_ - y])) / mag(x - x_, y - y_))
		(x, y) = (x_, y_)
	if dot([x, y], [x - x1, y - y1]) * dot([x1, y1], [x1 - x, y1 - y]) > 0:
		mags.append(abs(cross([x, y], [x1 - x, y1 - y])) / mag(x - x1, y - y1))
	print((max(mags) ** 2 - min(mags) ** 2) * PI)
main()


import math

def distance(point1, point2=(0, 0)):
	sqr_diff_x = (point1[0] - point2[0]) ** 2
	sqr_diff_y = (point1[1] - point2[1]) ** 2
	distance = math.sqrt(sqr_diff_x + sqr_diff_y)
	return distance
(vertices, x, y) = [int(i) for i in input().split(' ')]
start = (x, y)
vertex_indices = []
for i in range(int(vertices)):
	point = input().split(' ')
	vertex_indices.append((int(point[0]), int(point[1])))
vertex_indices = vertex_indices
boundary_test = 1 / math.sqrt(2)
largest_distance = float('Inf')
prev_distance = None
cur_distance = 0
min_distance = largest_distance
max_distance = -largest_distance
for i in range(len(vertex_indices)):
	prev = vertex_indices[i - 1]
	cur = vertex_indices[i]
	cur_to_start = (start[0] - cur[0], start[1] - cur[1])
	cur_to_prev = (prev[0] - cur[0], prev[1] - cur[1])
	dot_product1 = cur_to_start[0] * cur_to_prev[0] + cur_to_start[1] * cur_to_prev[1]
	prev_to_start = (start[0] - prev[0], start[1] - prev[1])
	prev_to_cur = (-cur_to_prev[0], -cur_to_prev[1])
	dot_product2 = prev_to_start[0] * prev_to_cur[0] + prev_to_start[1] * prev_to_cur[1]
	on_inside = dot_product1 > 0 and dot_product2 > 0
	on_boundary = dot_product1 == 0
	min_distance_test = max_distance_test = distance(cur_to_start)
	if on_inside:
		numerator = math.fabs(prev_to_cur[1] * start[0] - prev_to_cur[0] * start[1] + cur[0] * prev[1] - cur[1] * prev[0])
		denominator = distance(prev_to_cur)
		min_distance_test = numerator / denominator
	if min_distance_test < min_distance:
		min_distance = min_distance_test
	if max_distance_test > max_distance:
		max_distance = max_distance_test
area = math.pi * (max_distance ** 2 - min_distance ** 2)
print(area)


from math import *
from sys import *
from decimal import *

def S(r1, r2):
	return acos(-1) * (r2 - r1)

def geth(x0, y0, x1, y1, x2, y2):
	U1 = x1 * (y1 - y2) + y1 * (x2 - x1)
	U2 = x0 * (x1 - x2) + y0 * (y1 - y2)
	KEK1 = y1 - y2
	KEK2 = x1 - x2
	det1 = U1 * KEK1 + U2 * KEK2
	det2 = U2 * KEK1 - U1 * KEK2
	det = KEK1 ** 2 + KEK2 ** 2
	return (det1 / det, det2 / det)

def diist(x0, y0, x1, y1):
	return sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2)
(n, x0, y0) = (int(z) for z in stdin.readline().split())
(ma, mi) = (0, 10 ** 15)
(xp, yp) = (10 ** 7, 10 ** 7)
(xf, yf) = (0, 0)
for i in range(n):
	(xc, yc) = (int(z) for z in stdin.readline().split())
	dist = (x0 - xc) ** 2 + (y0 - yc) ** 2
	ma = max(dist, ma)
	mi = min(dist, mi)
	if xp <= 10 ** 6:
		(xmid, ymid) = geth(x0, y0, xc, yc, xp, yp)
		if diist(xmid, ymid, xc, yc) + diist(xmid, ymid, xp, yp) <= diist(xc, yc, xp, yp):
			mi = min((xmid - x0) ** 2 + (ymid - y0) ** 2, mi)
	else:
		(xf, yf) = (xc, yc)
	(xp, yp) = (xc, yc)
(xmid, ymid) = geth(x0, y0, xc, yc, xf, yf)
if diist(xmid, ymid, xc, yc) + diist(xmid, ymid, xf, yf) <= diist(xc, yc, xf, yf):
	mi = min((xmid - x0) ** 2 + (ymid - y0) ** 2, mi)
print(S(mi, ma))


def dot_product(v1, v2):
	return v1.x * v2.x + v1.y * v2.y

class vector:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def length(self):
		return (self.x ** 2 + self.y ** 2) ** 0.5

	def cross_product(self, v):
		return self.x * v.y - self.y * v.x

class line:

	def __init__(self, a, b):
		self.a = a
		self.b = b

	def distance(self, p):
		return abs(vector(p.x - self.a.x, p.y - self.a.y).cross_product(vector(p.x - self.b.x, p.y - self.b.y)) / vector(self.a.x - self.b.x, self.a.y - self.b.y).length())

class ray:

	def __init__(self, a, b):
		self.a = a
		self.b = b

	def distance(self, p):
		if dot_product(vector(self.b.x - self.a.x, self.b.y - self.a.y), vector(p.x - self.a.x, p.y - self.a.y)) >= 0:
			return line(self.a, self.b).distance(p)
		return vector(self.a.x - p.x, self.a.y - p.y).length()

class segment:

	def __init__(self, a, b):
		self.a = a
		self.b = b

	def min_distance(self, p):
		if dot_product(vector(self.b.x - self.a.x, self.b.y - self.a.y), vector(p.x - self.a.x, p.y - self.a.y)) >= 0:
			return ray(self.b, self.a).distance(p)
		return vector(self.a.x - p.x, self.a.y - p.y).length()

	def max_distance(self, p):
		return max(vector(self.a.x - p.x, self.a.y - p.y).length(), vector(self.b.x - p.x, self.b.y - p.y).length())
(n, x, y) = map(int, input().split())
p = vector(x, y)
min_r = 2000000
max_r = 0
a = [[] for i in range(n + 1)]
for i in range(n):
	a[i] = list(map(int, input().split()))
	a[i] = vector(a[i][0], a[i][1])
a[n] = a[0]
for i in range(n):
	s = segment(a[i], a[i + 1])
	min_r = min(min_r, s.min_distance(p))
	max_r = max(max_r, s.max_distance(p))
pi = 3.141592653589
print(pi * max_r ** 2 - pi * min_r ** 2)


import math
(n, px, py) = map(int, input().split())

def line_mindist(x1, y1, x2, y2):
	cos1 = (px - x1) * (x2 - x1) + (py - y1) * (y2 - y1)
	cos2 = (px - x2) * (x1 - x2) + (py - y2) * (y1 - y2)
	if cos1 < 0 or cos2 < 0:
		dist1 = (px - x1) ** 2 + (py - y1) ** 2
		dist2 = (px - x2) ** 2 + (py - y2) ** 2
		return min(dist1, dist2)
	if x2 == x1:
		perp_dist = abs(px - x1) ** 2
	elif y2 == y1:
		perp_dist = abs(py - y1) ** 2
	else:
		m = (y1 - y2) / (x1 - x2)
		c = y1 - m * x1
		perp_dist = abs(py - m * px - c) ** 2 / (1 + m * m)
	return perp_dist
pi = 3.141592653589793
maxdist = 0
mindist = 1000000000000000000
(past_x, past_y) = map(int, input().split())
first_x = past_x
first_y = past_y
for i in range(1, n):
	d = (past_x - px) * (past_x - px) + (past_y - py) * (past_y - py)
	if d > maxdist:
		maxdist = d
	(x, y) = map(int, input().split())
	d = line_mindist(past_x, past_y, x, y)
	if d < mindist:
		mindist = d
	past_x = x
	past_y = y
d = (past_x - px) * (past_x - px) + (past_y - py) * (past_y - py)
if d > maxdist:
	maxdist = d
d = line_mindist(past_x, past_y, first_x, first_y)
if d < mindist:
	mindist = d
print(pi * (maxdist - mindist))


__author__ = 'vboldovs'
import math
GLOBAL_INNER_PRODUCT_LIMIT = math.pow(10, -3)

class point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

class line:

	def __init__(self, start_point, end_point):
		self.x = end_point.x - start_point.x
		self.y = end_point.y - start_point.y

def distance(p1, p2):
	return math.sqrt(math.pow(p1.x - p2.x, 2) + math.pow(p1.y - p2.y, 2))

def product(line1, line2):
	return line1.x * line2.x + line1.y * line2.y
m = input().split()
n = int(m[0])
center = point(int(m[1]), int(m[2]))
points = []
for _i in range(n):
	temp = input().split()
	points.append(point(int(temp[0]), int(temp[1])))
max_r = distance(center, points[0])
min_r = max_r
for p in points:
	d = distance(p, center)
	max_r = max(max_r, d)
	min_r = min(min_r, d)
for i in range(n):
	s_point = points[i]
	try:
		e_point = points[i + 1]
	except IndexError:
		e_point = points[0]
	curr_line = line(s_point, e_point)
	prod_s = product(curr_line, line(s_point, center))
	prod_e = product(curr_line, line(e_point, center))
	if prod_s * prod_e > 0:
		continue
	alpha = prod_s / abs(prod_e - prod_s)
	p_point = point((1 - alpha) * s_point.x + alpha * e_point.x, (1 - alpha) * s_point.y + alpha * e_point.y)
	min_r = min(min_r, distance(p_point, center))
print(math.pi * math.pow(max_r, 2) - math.pi * math.pow(min_r, 2))


import math
(n, x, y) = map(int, input().split())
li = []
dis = []
for i in range(n):
	(a, b) = map(int, input().split())
	li.append([a, b])
	dis.append((x - a) ** 2 + (y - b) ** 2)
for i in range(n - 1):
	(a, b) = li[i]
	(m, n) = li[i + 1]
	if ((m - a) * (m - x) + (n - b) * (n - y)) * ((m - a) * (a - x) + (n - b) * (b - y)) <= 0:
		len = ((n - b) * x - (m - a) * y + m * b - a * n) ** 2 / ((n - b) ** 2 + (m - a) ** 2)
		dis.append(len)
(a, b) = li[-1]
(m, n) = li[0]
if ((m - a) * (m - x) + (n - b) * (n - y)) * ((m - a) * (a - x) + (n - b) * (b - y)) <= 0:
	len = ((n - b) * x - (m - a) * y + m * b - a * n) ** 2 / ((n - b) ** 2 + (m - a) ** 2)
	dis.append(len)
print(math.pi * (max(dis) - min(dis)))


from decimal import Decimal, getcontext
getcontext().prec = 48

def pi():
	getcontext().prec += 2
	three = Decimal(3)
	(lasts, t, s, n, na, d, da) = (0, three, 3, 1, 0, 0, 24)
	while s != lasts:
		lasts = s
		(n, na) = (n + na, na + 8)
		(d, da) = (d + da, da + 32)
		t = t * n / d
		s += t
	getcontext().prec -= 2
	return +s

def distance(x0, y0, x1, y1):
	return ((x0 - x1) * (x0 - x1) + (y0 - y1) * (y0 - y1)) ** 0.5

def line_segment_point_closest_distance(px, py, x1, y1, x2, y2):
	minx = min(x1, x2)
	maxx = max(x1, x2)
	miny = min(y1, y2)
	maxy = max(y1, y2)
	if x1 - x2 == 0:
		xint = x2
		yint = py
	elif y1 - y2 == 0:
		xint = px
		yint = y2
	else:
		m1 = (y1 - y2) / (x1 - x2)
		m2 = -1 / m1
		xint = (-m2 * px + m1 * x1 + py - y1) / (m1 - m2)
		yint = m1 * (xint - x1) + y1
	if xint <= maxx and xint >= minx and (yint <= maxy) and (yint >= miny):
		return distance(px, py, xint, yint)
	elif distance(xint, yint, x1, y1) >= distance(xint, yint, x2, y2):
		return distance(px, py, x2, y2)
	else:
		return distance(px, py, x1, y1)

def main():
	invalues = input().strip().split(' ')
	(n, px, py) = (int(invalues[0]), int(invalues[1]), int(invalues[2]))
	invalues = input().strip().split(' ')
	(fx, fy) = (int(invalues[0]), int(invalues[1]))
	(lx, ly) = (fx, fy)
	min_n = distance(px, py, fx, fy)
	max_n = distance(px, py, fx, fy)
	for _ in range(1, n):
		invalues = input().strip().split(' ')
		(ix, iy) = (int(invalues[0]), int(invalues[1]))
		dist = distance(px, py, ix, iy)
		max_n = max(max_n, dist)
		min_n = min(min_n, dist)
		dist = line_segment_point_closest_distance(px, py, lx, ly, ix, iy)
		min_n = min(min_n, dist)
		max_n = max(max_n, dist)
		(lx, ly) = (ix, iy)
	dist = line_segment_point_closest_distance(px, py, lx, ly, fx, fy)
	max_n = max(max_n, dist)
	min_n = min(min_n, dist)
	pi = 3.141592653589793
	print('{}'.format(pi * (max_n ** 2 - min_n ** 2)))
	return
main()


def main():
	(n, a, b) = map(int, input().split())
	(l, res) = ([], [])
	for _ in range(n):
		(u, v) = input().split()
		l.append((int(u) - a, int(v) - b))
	(x0, y0) = l[-1]
	for (x1, y1) in l:
		res.append(x1 * x1 + y1 * y1)
		(dx, dy) = (x1 - x0, y1 - y0)
		if (x0 * dx + y0 * dy) * (x1 * dx + y1 * dy) < 0:
			x0 = x0 * y1 - x1 * y0
			res.append(x0 * x0 / (dx * dx + dy * dy))
		(x0, y0) = (x1, y1)
	print((max(res) - min(res)) * 3.141592653589793)
main()


import math

def pythagoras(p, p1):
	return math.sqrt(pow(p[0] - p1[0], 2) + pow(p[1] - p1[1], 2))

def distance(p, p1, p2):
	if p2[1] == p1[1]:
		if p[0] < min(p1[0], p2[0]) or p[0] > max(p1[0], p2[0]):
			return pythagoras(p, p1)
		else:
			return abs(p1[1] - p[1])
	if p2[0] == p1[0]:
		if p[1] < min(p1[1], p2[1]) or p[1] > max(p1[1], p2[1]):
			return pythagoras(p, p1)
		else:
			return abs(p1[0] - p[0])
	k = (p2[1] - p1[1]) / (p2[0] - p1[0])
	b = p2[1] - k * p2[0]
	k0 = -1 / k
	b0 = p[1] - k0 * p[0]
	x = (b - b0) / (k0 - k)
	y = k * x + b
	if x < min(p1[0], p2[0]) or x > max(p1[0], p2[0]):
		return pythagoras(p, p1)
	else:
		return math.sqrt(pow(p[0] - x, 2) + pow(p[1] - y, 2))

def calc(v, p):
	m = float('inf')
	for i in range(len(v) - 1):
		m = min(m, distance(p, v[i], v[i + 1]))
	m = min(m, distance(p, v[0], v[len(v) - 1]))
	return m
(n, x, y) = [int(i) for i in input().split()]
v = []
sr = 0
br = 0
for i in range(n):
	(a, b) = [int(k) for k in input().split()]
	v.append([a, b])
	r = math.sqrt(pow(a - x, 2) + pow(b - y, 2))
	br = max(br, r)
sr = calc(v, [x, y])
print(math.pi * (pow(br, 2) - pow(sr, 2)))


from math import *

def dist(a, b, p):
	xu = b[0] - a[0]
	yu = b[1] - a[1]
	xv = p[0] - a[0]
	yv = p[1] - a[1]
	c1 = xu * xv + yu * yv
	c2 = xu * xu + yu * yu
	(x, y) = (0, 0)
	if c1 <= 0:
		x = a[0] - p[0]
		y = a[1] - p[1]
	elif c2 <= c1:
		x = b[0] - p[0]
		y = b[1] - p[1]
	else:
		x = a[0] + xu * (c1 / c2) - p[0]
		y = a[1] + yu * (c1 / c2) - p[1]
	return x * x + y * y
(n, cx, cy) = map(int, input().split())
pts = [list(map(int, input().split())) for _ in range(n)]
(mini, maxi) = (float('inf'), 0)
for i in range(n):
	(px, py) = pts[i]
	maxi = max((px - cx) ** 2 + (py - cy) ** 2, maxi)
	mini = min(dist(pts[i - 1], pts[i], [cx, cy]), mini)
print((maxi - mini) * pi)


import math
import sys

def rl(proc=None):
	if proc is not None:
		return proc(sys.stdin.readline())
	else:
		return sys.stdin.readline().rstrip()

def srl(proc=None):
	if proc is not None:
		return list(map(proc, rl().split()))
	else:
		return rl().split()
INF = 10 ** 30

def dist(x1, y1, x2, y2):
	return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)

def dist2(x0, y0, x1, y1, x2, y2):
	x1 -= x0
	y1 -= y0
	x2 -= x0
	y2 -= y0
	dx = x2 - x1
	dy = y2 - y1
	a = -(x1 * dx + y1 * dy) / (dx * dx + dy * dy)
	if a < 0 or a > 1:
		return INF
	xt = x1 + a * dx
	yt = y1 + a * dy
	return xt * xt + yt * yt

def main():
	(N, Px, Py) = srl(int)
	A = [srl(int) for _ in range(N)]
	mx = 0
	mn = INF
	for (x, y) in A:
		d = dist(Px, Py, x, y)
		mx = max(mx, d)
		mn = min(mn, d)
	mn = min(mn, dist2(Px, Py, A[0][0], A[0][1], A[-1][0], A[-1][1]))
	for i in range(1, len(A)):
		mn = min(mn, dist2(Px, Py, A[i][0], A[i][1], A[i - 1][0], A[i - 1][1]))
	print('%.9f' % (math.pi * (mx - mn)))
main()


__author__ = 'Utena'
import math
(n, a, b) = map(int, input().split())
m = []
s = []
for i in range(n):
	m.append(list(map(int, input().split())))
for i in range(n):
	(a1, b1) = m[i]
	s.append((a1 - a) ** 2 + (b1 - b) ** 2)
for i in range(n - 1):
	(a1, b1) = m[i]
	(a2, b2) = m[i + 1]
	if ((a2 - a1) * (a2 - a) + (b2 - b1) * (b2 - b)) * ((a2 - a1) * (a1 - a) + (b2 - b1) * (b1 - b)) <= 0:
		l = ((b2 - b1) * a - (a2 - a1) * b - a1 * b2 + a2 * b1) ** 2 / ((b2 - b1) ** 2 + (a2 - a1) ** 2)
		s.append(l)
(a1, b1) = m[-1]
(a2, b2) = m[0]
if ((a2 - a1) * (a2 - a) + (b2 - b1) * (b2 - b)) * ((a2 - a1) * (a1 - a) + (b2 - b1) * (b1 - b)) <= 0:
	l = ((b2 - b1) * a - (a2 - a1) * b - a1 * b2 + a2 * b1) ** 2 / ((b2 - b1) ** 2 + (a2 - a1) ** 2)
	s.append(l)
t = math.pi * (max(s) - min(s))
print(t)


import math

def cross(vecA, vecB):
	return abs(vecA[0] * vecB[1] - vecA[1] * vecB[0])

def l2_norm(pointA, pointB):
	return (pointA[0] - pointB[0]) ** 2 + (pointA[1] - pointB[1]) ** 2

def height5(P, A, B):
	a = l2_norm(A, P)
	b = l2_norm(B, P)
	base = l2_norm(A, B)
	if a >= base + b or b >= base + a:
		return min(a, b)
	else:
		vecA = (A[0] - P[0], A[1] - P[1])
		vecB = (B[0] - P[0], B[1] - P[1])
		area = cross(vecA, vecB)
		h = area * area / base
		return h

def CF613A():
	(N, cx, cy) = list(map(int, input().split()))
	points = [tuple(map(int, input().split())) for _ in range(N)]
	center = (cx, cy)
	distances = [l2_norm(center, point) for point in points]
	max_radius = max(distances)
	min_radius = float('inf')
	for i in range(N):
		height = height5(center, points[i], points[(i + 1) % N])
		min_radius = min(min_radius, height)
	area = math.pi * (max_radius - min_radius)
	return area
res = CF613A()
print(res)


import math

def Len(w):
	return w[0] * w[0] + w[1] * w[1]
(n, x, y) = input().split(' ')
n = int(n)
x = int(x)
y = int(y)
arr = []
for i in range(0, n):
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	arr.append([a, b])
r1 = 5000000000000
r2 = -500000000000
for i in range(0, n):
	st = [arr[(i + 1) % n][0] - arr[i][0], arr[(i + 1) % n][1] - arr[i][1]]
	r = [arr[i][0] - x, arr[i][1] - y]
	q = [arr[(i + 1) % n][0] - x, arr[(i + 1) % n][1] - y]
	d = q[0] * r[1] - q[1] * r[0]
	d *= d
	s = d / Len(st)
	if Len(q) - s < Len(st) and Len(r) - s < Len(st):
		r1 = min(r1, s)
		r2 = max(r2, s)
for i in arr:
	s = (x - i[0]) * (x - i[0]) + (y - i[1]) * (y - i[1])
	r1 = min(r1, s)
	r2 = max(r2, s)
print((r2 - r1) * math.pi)


import functools

class Point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def squared_distance(self, another_point):
		return (self.x - another_point.x) ** 2 + (self.y - another_point.y) ** 2

def point_segment_distance(p, a, b):
	ap = (p.x - a.x, p.y - a.y)
	ab = (b.x - a.x, b.y - a.y)
	bp = (p.x - b.x, p.y - b.y)
	indicator = (ap[0] * ab[0] + ap[1] * ab[1]) / (ab[0] ** 2 + ab[1] ** 2)
	if 0 < indicator < 1:
		return ap[0] ** 2 + ap[1] ** 2 - indicator ** 2 * (ab[0] ** 2 + ab[1] ** 2)
	if indicator <= 0:
		return ap[0] ** 2 + ap[1] ** 2
	if indicator >= 1:
		return bp[0] ** 2 + bp[1] ** 2

class SnowBlower:

	def solution(self):
		first_line = input()
		first_line = first_line.split(' ')
		num_vertices = int(first_line[0])
		origin = Point(int(first_line[1]), int(first_line[2]))
		vertices = []
		for _ in range(num_vertices):
			point = input()
			point = point.split(' ')
			vertices.append(Point(int(point[0]), int(point[1])))
		max_distance = float('-inf')
		min_distance = float('inf')
		for vertex in vertices:
			squared_distance = origin.squared_distance(vertex)
			max_distance = squared_distance if squared_distance > max_distance else max_distance
		for i in range(num_vertices):
			distance = point_segment_distance(origin, vertices[i], vertices[i - 1])
			min_distance = distance if distance < min_distance else min_distance
		pi = 3.14159265358
		print(pi * (max_distance - min_distance))
snow_blower = SnowBlower()
snow_blower.solution()


def dis(lx, ly):
	return lx * lx + ly * ly

def linecoeff(lx, ly, rx, ry):
	return (ry - ly, lx - rx, -lx * ry + ly * rx)
from math import *
(n, px, py) = map(int, input().split())
a = [[0, 0] for i in range(n)]
minlen = 100000000000000
maxlen = 0
for i in range(n):
	(x, y) = map(float, input().split())
	x -= px
	y -= py
	(a[i][0], a[i][1]) = (x, y)
	l = x * x + y * y
	maxlen = max(maxlen, l)
a.append([a[0][0], a[0][1]])
for i in range(n):
	(lx, ly) = (a[i][0], a[i][1])
	(rx, ry) = (a[i + 1][0], a[i + 1][1])
	(A, B, C) = linecoeff(lx, ly, rx, ry)
	DL = sqrt(A * A + B * B)
	(A, B, C) = (A / DL, B / DL, C / DL)
	ddd = C
	tx = -ddd * A
	ty = -ddd * B
	l = dis(tx, ty)
	l = dis(tx, ty)
	if (lx <= tx <= rx or rx <= tx <= lx) and (ly <= ty <= ry or ry <= ty <= ly):
		minlen = min(minlen, l)
	l = dis(lx, ly)
	minlen = min(minlen, l)
print(pi * (maxlen - minlen))


import math

def dotproduct(point1, point2):
	(x1, y1) = point1
	(x2, y2) = point2
	product = x1 * x2 + y1 * y2
	return product

def crossproduct(point1, point2):
	(x1, y1) = point1
	(x2, y2) = point2
	product = x1 * y2 - y1 * x2
	return product

def magnitude(x, y):
	mag = math.sqrt(x ** 2 + y ** 2)
	return mag

def main():
	magnitudes = []
	(n, x0, y0) = map(int, input().split())
	x = x0
	y = y0
	for i in range(n):
		(x2, y2) = map(int, input().split())
		x2 = x2 - x0
		y2 = y2 - y0
		if i == 0:
			x1 = x2
			y1 = y2
			x = x2
			y = y2
		magnitudes.append(magnitude(x2, y2))
		dot1 = dotproduct([x, y], [x - x2, y - y2])
		dot2 = dotproduct([x2, y2], [x2 - x, y2 - y])
		if dot1 * dot2 > 0:
			total = abs(crossproduct([x, y], [x2 - x, y2 - y]) / magnitude(x - x2, y - y2))
			magnitudes.append(total)
		x = x2
		y = y2
	dot3 = dotproduct([x, y], [x - x1, y - y1])
	dot4 = dotproduct([x1, y1], [x1 - x, y1 - y])
	if dot3 * dot4 > 0:
		total1 = abs(crossproduct([x, y], [x1 - x, y1 - y]) / magnitude(x - x1, y - y1))
		magnitudes.append(total1)
	print((max(magnitudes) ** 2 - min(magnitudes) ** 2) * 3.141592653589793)
main()


import math

class StdIO:

	def read_int(self):
		return int(self.read_string())

	def read_ints(self, sep=None):
		return [int(i) for i in self.read_strings(sep)]

	def read_float(self):
		return float(self.read_string())

	def read_floats(self, sep=None):
		return [float(i) for i in self.read_strings(sep)]

	def read_string(self):
		return input()

	def read_strings(self, sep=None):
		return self.read_string().split(sep)
io = StdIO()

def closest(a, b, p):
	(ax, ay) = a
	(bx, by) = b
	(px, py) = p
	(lx, ly) = (bx - ax, by - ay)
	num = ax * lx - px * lx + ay * ly - py * ly
	den = lx * lx + ly * ly
	t = -num / den
	if t > 1.0:
		return b
	elif t < 0.0:
		return a
	else:
		return (ax + t * lx, ay + t * ly)

def dist(a, b):
	(ax, ay) = a
	(bx, by) = b
	return math.hypot(ax - bx, ay - by)

def main():
	(n, px, py) = io.read_ints()
	p = (px, py)
	prev = None
	first = None
	min_dst = float('inf')
	max_dst = 0
	for i in range(n):
		(qx, qy) = io.read_ints()
		q = (qx, qy)
		dst = dist(p, q)
		max_dst = max(max_dst, dst)
		if prev is None:
			prev = q
			first = q
			continue
		r = closest(prev, q, p)
		dst = dist(p, r)
		min_dst = min(min_dst, dst)
		prev = q
	r = closest(prev, first, p)
	dst = dist(p, r)
	min_dst = min(min_dst, dst)
	r = min_dst
	R = max_dst
	A = math.pi * (R * R - r * r)
	print(A)
main()


from sys import stdin
from collections import defaultdict
from operator import itemgetter
from math import hypot, pi, sqrt

def main():
	(n, cx, cy) = tuple(map(int, stdin.readline().split()))
	ps = [tuple(map(int, stdin.readline().split())) for _ in range(n)]
	print('{0:.10f}'.format(run(n, (cx, cy), ps)))

def run(n, cnt, ps):
	ps.append(ps[0])
	mx = max([pdist(cnt, p) for p in ps])
	mn = min([dist(cnt, ps[i], ps[i + 1]) for i in range(n)])
	return pi * (mx + mn) * (mx - mn)

def pdist(p1, p2):
	return hypot(p2[0] - p1[0], p2[1] - p1[1])

def dist(cnt, p1, p2):
	dx = p2[0] - p1[0]
	dy = p2[1] - p1[1]
	t = ((cnt[0] - p1[0]) * dx + (cnt[1] - p1[1]) * dy) / (dx * dx + dy * dy)
	if t < 0:
		return pdist(cnt, p1)
	elif t > 1:
		return pdist(cnt, p2)
	else:
		p = (p1[0] + t * dx, p1[1] + t * dy)
		return pdist(cnt, p)
main()


import math
(n, a, b) = [int(x) for x in input().split()]
distances = []
(x, y) = [int(x) for x in input().split()]
distances.append(math.hypot(x - a, y - b))
(prevx, prevy) = (x, y)
(firstx, firsty) = (x, y)
for i in range(n - 1):
	(x, y) = [int(x) for x in input().split()]
	distances.append(math.hypot(x - a, y - b))
	scalar_mult = (a - x) * (prevx - x) + (b - y) * (prevy - y)
	sq = (prevx - x) ** 2 + (prevy - y) ** 2
	if 0 < scalar_mult < sq:
		distances.append(((a - x) ** 2 + (b - y) ** 2 - scalar_mult ** 2 / sq) ** 0.5)
	(prevx, prevy) = (x, y)
scalar_mult = (a - prevx) * (firstx - prevx) + (b - prevy) * (firsty - prevy)
sq = (firstx - prevx) ** 2 + (firsty - prevy) ** 2
if 0 < scalar_mult < sq:
	distances.append(((a - prevx) ** 2 + (b - prevy) ** 2 - scalar_mult ** 2 / sq) ** 0.5)
distances.sort()
print((distances[-1] - distances[0]) * (distances[-1] + distances[0]) * math.pi)


import math

def dist(x, y, x1, y1, x2, y2):
	a = x - x1
	b = y - y1
	c = x2 - x1
	d = y2 - y1
	dot = a * c + b * d
	lensq = c * c + d * d
	param = -1
	if lensq != 0:
		param = dot / lensq
	if param < 0:
		xx = x1
		yy = y1
	elif param > 1:
		xx = x2
		yy = y2
	else:
		xx = x1 + param * c
		yy = y1 + param * d
	dx = x - xx
	dy = y - yy
	return (dx * dx + dy * dy) ** 0.5

def dist2(x, y):
	return ((x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2) ** 0.5
import math
maxx = -1
minn = 100000000000000000
pts = []
(a, b, c) = map(int, input().split(' '))
for i in range(a):
	(x, y) = map(int, input().split(' '))
	pts.append([x, y])
k = []
for i in pts:
	k.append(dist2(i, [b, c]))
pts.append(pts[0])
for i in range(a):
	k.append(dist(b, c, pts[i][0], pts[i][1], pts[i + 1][0], pts[i + 1][1]))
print((max(k) ** 2 - min(k) ** 2) * math.pi)


import math
(n, px, py) = map(int, input().split())
(xs, ys, l) = (list(), list(), list())
for _ in range(n):
	(x, y) = map(int, input().split())
	xs.append(x - px)
	ys.append(y - py)
(x0, y0) = (xs[-1], ys[-1])
for (x, y) in zip(xs, ys):
	l.append(x * x + y * y)
	(dx, dy) = (x - x0, y - y0)
	if (x0 * dx + y0 * dy) * (x * dx + y * dy) < 0:
		x0 = x0 * y - x * y0
		l.append(x0 * x0 / (dx * dx + dy * dy))
	(x0, y0) = (x, y)
print(math.pi * (max(l) - min(l)))


def distance(x0, y0, x1, y1):
	return ((x0 - x1) * (x0 - x1) + (y0 - y1) * (y0 - y1)) ** 0.5

def line_segment_point_closest_distance(px, py, x1, y1, x2, y2):
	minx = min(x1, x2)
	maxx = max(x1, x2)
	miny = min(y1, y2)
	maxy = max(y1, y2)
	if x1 - x2 == 0:
		xint = x2
		yint = py
	elif y1 - y2 == 0:
		xint = px
		yint = y2
	else:
		m1 = (y1 - y2) / (x1 - x2)
		m2 = -1 / m1
		xint = (-m2 * px + m1 * x1 + py - y1) / (m1 - m2)
		yint = m1 * (xint - x1) + y1
	if xint <= maxx and xint >= minx and (yint <= maxy) and (yint >= miny):
		return distance(px, py, xint, yint)
	elif distance(xint, yint, x1, y1) >= distance(xint, yint, x2, y2):
		return distance(px, py, x2, y2)
	else:
		return distance(px, py, x1, y1)

def main():
	invalues = input().strip().split(' ')
	(n, px, py) = (int(invalues[0]), int(invalues[1]), int(invalues[2]))
	invalues = input().strip().split(' ')
	(fx, fy) = (int(invalues[0]), int(invalues[1]))
	(lx, ly) = (fx, fy)
	min_n = distance(px, py, fx, fy)
	max_n = distance(px, py, fx, fy)
	for _ in range(1, n):
		invalues = input().strip().split(' ')
		(ix, iy) = (int(invalues[0]), int(invalues[1]))
		dist = distance(px, py, ix, iy)
		max_n = max(max_n, dist)
		dist = line_segment_point_closest_distance(px, py, lx, ly, ix, iy)
		min_n = min(min_n, dist)
		(lx, ly) = (ix, iy)
	dist = line_segment_point_closest_distance(px, py, lx, ly, fx, fy)
	min_n = min(min_n, dist)
	pi = 3.141592653589793
	print('{}'.format(pi * (max_n ** 2 - min_n ** 2)))
main()


__author__ = 'Subirdcom'
from math import hypot
from math import pi
from math import acos
from math import degrees
from math import sqrt

def distance(x1, y1, x2, y2):
	return hypot(x1 - x2, y1 - y2)

def is_stupid(x1, y1, x2, y2, x3, y3):
	a = distance(x1, y1, x2, y2)
	b = distance(x2, y2, x3, y3)
	c = distance(x1, y1, x3, y3)
	return a ** 2 > b ** 2 + c ** 2 or c ** 2 > a ** 2 + b ** 2

def seg_dist(x, y, x1, y1, x2, y2):
	if is_stupid(x, y, x1, y1, x2, y2):
		return min(distance(x, y, x1, y1), distance(x, y, x2, y2))
	else:
		a = distance(x, y, x1, y1)
		b = distance(x1, y1, x2, y2)
		c = distance(x, y, x2, y2)
		p = (a + b + c) / 2
		s = sqrt(p * (p - a) * (p - b) * (p - c))
		return 2 * s / b
(n, px, py) = [int(i) for i in input().split()]
(x, y) = [int(i) for i in input().split()]
lst = [[x, y]]
_min = distance(x, y, px, py)
_max = _min
for i in range(n - 1):
	(x, y) = [int(i) for i in input().split()]
	lst += [[x, y]]
	dist = distance(x, y, px, py)
	_max = max(_max, dist)
	_min = min(_min, dist)
for i in range(n - 1):
	_min = min(_min, seg_dist(px, py, lst[i][0], lst[i][1], lst[i + 1][0], lst[i + 1][1]))
_min = min(_min, seg_dist(px, py, lst[0][0], lst[0][1], lst[n - 1][0], lst[n - 1][1]))
print(pi * _max ** 2 - pi * _min ** 2)


def line(x1, y1, x2, y2):
	a1 = x2 - x1
	b1 = y2 - y1
	(a1, b1) = (b1, -a1)
	c1 = -(a1 * x1 + b1 * y1)
	return [a1, b1, c1]

def check(x, y, x1, y1, x2, y2):
	if abs(((x - x1) ** 2 + (y - y1) ** 2) ** 0.5 + ((x - x2) ** 2 + (y - y2) ** 2) ** 0.5 - ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5) < 0.1 ** 10:
		return True
	else:
		return False
(n, x, y) = map(int, input().split())
maxi = 0
pi = 3.141592653589793
s = []
for i in range(n):
	(a, b) = map(int, input().split())
	s.append([a, b])
	maxi = max((x - a) ** 2 + (y - b) ** 2, maxi)
mini = 10 ** 20
for i in range(n):
	(a2, b2, c2) = line(s[i][0], s[i][1], s[(i + 1) % n][0], s[(i + 1) % n][1])
	a1 = -b2
	b1 = a2
	c1 = -(x * a1 + b1 * y)
	(xx, yy) = ((b1 * c2 - b2 * c1) / (-a2 * b1 + a1 * b2), (a1 * c2 - a2 * c1) / (a2 * b1 - a1 * b2))
	if check(xx, yy, s[i][0], s[i][1], s[(i + 1) % n][0], s[(i + 1) % n][1]):
		mini = min((a2 * x + b2 * y + c2) ** 2 / (a2 ** 2 + b2 ** 2), mini)
	else:
		mini = min((x - s[i][0]) ** 2 + (y - s[i][1]) ** 2, (x - s[(i + 1) % n][0]) ** 2 + (y - s[(i + 1) % n][1]) ** 2, mini)
print(pi * (maxi - mini))


import math

def dist(p_x, p_y, p0_x, p0_y, p1_x, p1_y):
	v_x = p1_x - p0_x
	v_y = p1_y - p0_y
	w_x = p_x - p0_x
	w_y = p_y - p0_y
	c1 = w_x * v_x + w_y * v_y
	if c1 <= 0:
		return math.hypot(p_x - p0_x, p_y - p0_y)
	c2 = v_x * v_x + v_y * v_y
	if c2 <= c1:
		return math.hypot(p_x - p1_x, p_y - p1_y)
	b = c1 / c2
	pb_x = p0_x + b * v_x
	pb_y = p0_y + b * v_y
	return math.hypot(p_x - pb_x, p_y - pb_y)
r_max = 0
r_min = 1000000000
(n, x0, y0) = [int(i) for i in input().split()]
x0 = float(x0)
y0 = float(y0)
(x_prev, y_prev) = input().split()
x_initial = x_prev = float(x_prev)
y_initial = y_prev = float(y_prev)
r_prev = math.hypot(x_prev - x0, y_prev - y0)
r_max = max(r_max, r_prev)
for i in range(n):
	if i < n - 1:
		(x1, y1) = input().split()
		x1 = float(x1)
		y1 = float(y1)
	else:
		x1 = x_initial
		y1 = y_initial
	dx = x1 - x0
	dy = y1 - y0
	r = math.hypot(dx, dy)
	r_max = max(r_max, r)
	d = dist(x0, y0, x_prev, y_prev, x1, y1)
	r_min = min(r_min, d)
	x_prev = x1
	y_prev = y1
	r_prev = r
print(math.pi * (r_max * r_max - r_min * r_min))


from math import hypot, pi, copysign

def main():
	(n, a, b) = map(int, input().split())
	(l, res) = ([], [])
	for _ in range(n):
		(x0, y0) = map(int, input().split())
		l.append((x0 - a, y0 - b))
	(x0, y0) = l[-1]
	for (x1, y1) in l:
		res.append(hypot(x1, y1))
		(dx, dy) = (x1 - x0, y1 - y0)
		if copysign(1.0, x0 * dx + y0 * dy) != copysign(1.0, x1 * dx + y1 * dy):
			res.append(abs(x0 * y1 - x1 * y0) / hypot(dx, dy))
		(x0, y0) = (x1, y1)
	print((max(res) ** 2 - min(res) ** 2) * pi)
main()


import math

def get_square(a, b, c):
	p = (a + b + c) * 0.5
	return math.sqrt(p * (p - a) * (p - b) * (p - c))

def get_angle(x1, y1, x2, y2, x3, y3):
	a1 = math.atan2(y1 - y2, x1 - x2)
	a2 = math.atan2(y3 - y2, x3 - x2)
	d = abs(a1 - a2)
	if d >= math.pi:
		return 2 * math.pi - d
	return d
try:
	while True:
		(n, cx, cy) = map(int, input().split())
		nd = 10000000000.0
		fd = -1
		points = []
		for i in range(n):
			(x, y) = map(int, input().split())
			d = math.hypot(x - cx, y - cy)
			points.append((x, y, d))
			nd = min(nd, d)
			fd = max(fd, d)
		for (i, (x, y, a)) in enumerate(points):
			(px, py, b) = points[i - 1]
			c = math.hypot(x - px, y - py)
			if a + b > c and a + c > b and (b + c > a):
				h = 2 * get_square(a, b, c) / c
				a1 = get_angle(x, y, px, py, cx, cy)
				a2 = get_angle(px, py, x, y, cx, cy)
				if a1 <= math.pi * 0.5 and a2 <= math.pi * 0.5:
					nd = min(nd, h)
		print('%.7f' % (math.pi * (fd - nd) * (fd + nd)))
except EOFError:
	pass