#define _USE_MATH_DEFINES
#include<iostream>
#include<complex>
#include<cmath>
#include<climits>
#include<iomanip>
using namespace std ;
typedef long double T ;
typedef complex<T> pt;
#define f(i,s,n) for(int i=s;i<n;i++)
// typedef long double T ;
#define x real()
#define y imag()
T dot(pt v,pt w) {return v.x*w.x + v.y*w.y;}
T cross(pt v,pt w) {return v.x*w.y - v.y*w.x;}
struct line
{
pt v;
T c ;
};
// T dot(pt v,pt w){return (conj(v)*w).x;}
// T cross(pt v,pt w){return (conj(v)*w).y;}
pt perp(pt p) {return {-p.y, p.x};}
line perp_line(line l,pt P)
{
line l2 ;
l2.v = perp(l.v) ;
l2.c = cross(l2.v,P) ;
return l2 ;
}
pt getv(pt a,pt b)
{
return {b.x-a.x,b.y-a.y} ;
}
bool intersect(line l1,line l2,pt& out)
{
T d = cross(l1.v, l2.v);
if (d == 0) return false;
out = (l2.v*l1.c - l1.v*l2.c) / d; // requires floating-point coordinates
// T xx = (l2.v.x*l1.c-l1.v.x*l2.c)/d ;
// T yy = (l2.v.y*l1.c-l1.v.y*l2.c)/d ;
// out = {xx,yy} ;
return true;
}
pt poi(line l1,pt P)
{
line l2 = perp_line(l1,P) ;
pt out ;
intersect(l1,l2,out) ;
return out ;
}
T dist(pt A,pt B)
{
return (A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y) ;
}
bool inseg(pt a,pt b,pt p)
{
return p.x<=max(a.x,b.x) && p.x>=min(a.x,b.x) && p.y<=max(a.y,b.y) && p.y>=min(a.y,b.y);
}
const int MAXN = 1e5+5 ;
pt pts[MAXN] ;
int main()
{
ios::sync_with_stdio(0) ;
cin.tie(0);cout.tie(0) ;
int n;T px,py;
pt P ;cin>>n>>px>>py ;
P = {px,py} ;
T maxd = 0,mind = LONG_MAX ;
f(i,0,n)
{
T a,b ;
cin>>a>>b ;
pts[i] = {a,b} ;
maxd = max(maxd,dist(P,pts[i])) ;
mind = min(mind,dist(P,pts[i])) ;
}
f(i,0,n)
{
int j = (i+1)%n ;
line l ;
l.v = getv(pts[i],pts[j]) ;
l.c = cross(l.v,pts[i]) ;
pt poii = poi(l,P) ;
if(inseg(pts[i],pts[j],poii))
{
mind = min(mind,dist(poii,P)) ;
}
}
cout<<setprecision(50)<<M_PI*(maxd-mind)<<"\n" ;
}
I2RlZmluZSBfVVNFX01BVEhfREVGSU5FUwojaW5jbHVkZTxpb3N0cmVhbT4KI2luY2x1ZGU8Y29tcGxleD4KI2luY2x1ZGU8Y21hdGg+CiNpbmNsdWRlPGNsaW1pdHM+CiNpbmNsdWRlPGlvbWFuaXA+CnVzaW5nIG5hbWVzcGFjZSBzdGQgOwp0eXBlZGVmIGxvbmcgZG91YmxlIFQgOwp0eXBlZGVmIGNvbXBsZXg8VD4gcHQ7CiNkZWZpbmUgZihpLHMsbikgZm9yKGludCBpPXM7aTxuO2krKykKLy8gdHlwZWRlZiBsb25nIGRvdWJsZSBUIDsKI2RlZmluZSB4IHJlYWwoKQojZGVmaW5lIHkgaW1hZygpClQgZG90KHB0IHYscHQgdykge3JldHVybiB2Lngqdy54ICsgdi55KncueTt9ClQgY3Jvc3MocHQgdixwdCB3KSB7cmV0dXJuIHYueCp3LnkgLSB2Lnkqdy54O30Kc3RydWN0IGxpbmUKewogICAgcHQgdjsKICAgIFQgYyA7Cn07Ci8vIFQgZG90KHB0IHYscHQgdyl7cmV0dXJuIChjb25qKHYpKncpLng7fQovLyBUIGNyb3NzKHB0IHYscHQgdyl7cmV0dXJuIChjb25qKHYpKncpLnk7fQpwdCBwZXJwKHB0IHApIHtyZXR1cm4gey1wLnksIHAueH07fQpsaW5lIHBlcnBfbGluZShsaW5lIGwscHQgUCkKewogICAgbGluZSBsMiA7CiAgICBsMi52ID0gcGVycChsLnYpIDsKICAgIGwyLmMgPSBjcm9zcyhsMi52LFApIDsKICAgIHJldHVybiBsMiA7Cn0KcHQgZ2V0dihwdCBhLHB0IGIpCnsKICAgIHJldHVybiB7Yi54LWEueCxiLnktYS55fSA7Cn0KYm9vbCBpbnRlcnNlY3QobGluZSBsMSxsaW5lIGwyLHB0JiBvdXQpCnsKICAgIFQgZCA9IGNyb3NzKGwxLnYsIGwyLnYpOwogICAgaWYgKGQgPT0gMCkgcmV0dXJuIGZhbHNlOwogICAgb3V0ID0gKGwyLnYqbDEuYyAtIGwxLnYqbDIuYykgLyBkOyAvLyByZXF1aXJlcyBmbG9hdGluZy1wb2ludCBjb29yZGluYXRlcwogICAgLy8gVCB4eCA9IChsMi52LngqbDEuYy1sMS52LngqbDIuYykvZCA7CiAgICAvLyBUIHl5ID0gKGwyLnYueSpsMS5jLWwxLnYueSpsMi5jKS9kIDsKICAgIC8vIG91dCA9IHt4eCx5eX0gOyAKICAgIHJldHVybiB0cnVlOwp9CnB0IHBvaShsaW5lIGwxLHB0IFApCnsKICAgIGxpbmUgbDIgPSBwZXJwX2xpbmUobDEsUCkgOwogICAgcHQgb3V0IDsKICAgIGludGVyc2VjdChsMSxsMixvdXQpIDsKICAgIHJldHVybiBvdXQgOwp9ClQgZGlzdChwdCBBLHB0IEIpCnsKICAgIHJldHVybiAoQS54LUIueCkqKEEueC1CLngpKyhBLnktQi55KSooQS55LUIueSkgOwp9CmJvb2wgaW5zZWcocHQgYSxwdCBiLHB0IHApCnsKICAgIHJldHVybiBwLng8PW1heChhLngsYi54KSAmJiBwLng+PW1pbihhLngsYi54KSAmJiBwLnk8PW1heChhLnksYi55KSAmJiBwLnk+PW1pbihhLnksYi55KTsgCn0KY29uc3QgaW50IE1BWE4gPSAxZTUrNSA7CnB0IHB0c1tNQVhOXSA7CmludCBtYWluKCkKewogICAgaW9zOjpzeW5jX3dpdGhfc3RkaW8oMCkgOwogICAgY2luLnRpZSgwKTtjb3V0LnRpZSgwKSA7CiAgICBpbnQgbjtUIHB4LHB5OwogICAgcHQgUCA7Y2luPj5uPj5weD4+cHkgOwogICAgUCA9IHtweCxweX0gOwogICAgVCBtYXhkID0gMCxtaW5kID0gTE9OR19NQVggOwogICAgZihpLDAsbikKICAgIHsKICAgICAgICBUIGEsYiA7CiAgICAgICAgY2luPj5hPj5iIDsKICAgICAgICBwdHNbaV0gPSB7YSxifSA7CiAgICAgICAgbWF4ZCA9IG1heChtYXhkLGRpc3QoUCxwdHNbaV0pKSA7CiAgICAgICAgbWluZCA9IG1pbihtaW5kLGRpc3QoUCxwdHNbaV0pKSA7CiAgICB9CiAgICBmKGksMCxuKQogICAgeyAKICAgICAgICBpbnQgaiA9IChpKzEpJW4gOwogICAgICAgIGxpbmUgbCA7CiAgICAgICAgbC52ID0gZ2V0dihwdHNbaV0scHRzW2pdKSA7CiAgICAgICAgbC5jID0gY3Jvc3MobC52LHB0c1tpXSkgOwogICAgICAgIHB0IHBvaWkgPSBwb2kobCxQKSA7CiAgICAgICAgaWYoaW5zZWcocHRzW2ldLHB0c1tqXSxwb2lpKSkKICAgICAgICB7CiAgICAgICAgICAgIG1pbmQgPSBtaW4obWluZCxkaXN0KHBvaWksUCkpIDsKICAgICAgICB9CiAgICB9CiAgICBjb3V0PDxzZXRwcmVjaXNpb24oNTApPDxNX1BJKihtYXhkLW1pbmQpPDwiXG4iIDsKCn0=