Problem: Problem

Given a convex polygon consisting of $ N $ vertices and the center coordinates of $ M $ circles. The radius of all circles is $ r $.

I want to find the minimum real number $ r $ that satisfies the following conditions.

Condition: Every point inside a convex polygon is contained in at least one circle.

Constraints

The input satisfies the following conditions.

* $ 3 \ le N \ le 100 $
* $ 1 \ le M \ le 100 $
* $ -10 ^ 5 \ le px_i, py_i \ le 10 ^ 5 $
* $ -10 ^ 5 \ le cx_i, cy_i \ le 10 ^ 5 $
* No matter which of the three vertices of the convex polygon is selected, they do not exist on the same straight line.

Input

All inputs are given as integers in the following format:


$ N $
$ px_1 $ $ py_1 $
$ px_2 $ $ py_2 $
::
$ px_N $ $ py_N $
$ M $
$ Cx_1 $ $ cy_1 $
$ cx_2 $ $ cy_2 $
::
$ Cx_M $ $ cy_M $


The $ 1 $ line is given an integer $ N $ that represents the number of vertices of the convex polygon.
Information on each vertex of the convex polygon is given in the counterclockwise order from the $ 2 $ line to the $ 2 + N-1 $ line. The $ 1 + i $ line is given $ px_i $ $ py_i $, which represents the coordinates of the $ i $ th vertex, separated by blanks.
The $ 2 + N $ line is given the integer $ M $, which represents the number of circles.
Information on the center coordinates of the circle is given from the $ 2 + N + 1 $ line to the $ 2 + N + M $ line. On the $ 2 + N + i $ line, $ cx_i $ $ cy_i $ representing the center coordinates of the $ i $ th circle is given, separated by blanks.

Output

Outputs the radius $ r $ of the smallest circle that satisfies the condition.
However, absolute or relative errors up to $ 10 ^ {-5} $ are acceptable.

Examples

Input

4
2 3
1 2
2 1
3 2
4
1 3
1 1
3 3
3 1


Output

1.414213562373


Input

7
-96469 25422
-55204 -45592
-29140 -72981
98837 -86795
92303 63297
19059 96012
-67980 70342
17
-4265 -14331
33561 72343
52055 98952
-71189 60872
10459 -7512
-11981 57756
-78228 -28044
37397 -69980
-27527 -51966
22661 -16694
13759 -59976
86539 -47703
17098 31709
-62497 -70998
-57608 59799
-1904 -35574
-73860 121


Output

75307.220122044484

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef double Real;
typedef complex<Real> P;

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define FORR(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)

#define CHMIN(a,b) (a)=min((a),(b))
#define CHMAX(a,b) (a)=max((a),(b))

#define MOD 1000000007
#define eps 1e-8

int n,m;
P cvx[125];
P pts[125];

Real cross(P a, P b){
  return imag(conj(a)*b);
}
Real dot(P a, P b){
  return real(conj(a)*b);
}

bool inner(P p){
  P g = (cvx[0] + cvx[n/3] + cvx[2*n/3]) / 3.0;
  // g += P(1e-7, 1e-7);
  int a = 0, b = n;
  while(a+1<b){
    int c = (a+b)/2;
    if(cross(cvx[a]-g, cvx[c]-g)>0){
      if(cross(cvx[a]-g, p-g)>0 && cross(cvx[c]-g, p-g)<0) b=c;
      else a=c;
    }else{
      if(cross(cvx[a]-g, p-g)<0 && cross(cvx[c]-g, p-g)>0) a=c;
      else b=c;
    }
  }
  b %= n;
  if(cross(cvx[a]-p, cvx[b]-p)<-eps) return false;
  return true;
}

bool inner2(P p){
  bool in = false;
  REP(i,n){
    P a = cvx[i]-p;
    P b = cvx[(i+1)%n]-p;
    if(imag(a)>imag(b))swap(a,b);
    if(imag(a)<=0 && 0<imag(b)){
      if(cross(a,b)<0)in = !in;
    }
    if(abs(cross(a,b))<eps && dot(a,b)<=0)return true;
  }
  return in;
}

int main(){
  scanf("%d",&n);
  REP(i,n){
    Real x,y;
    scanf("%lf%lf",&x,&y);
    cvx[i] = P(x,y);
  }
  scanf("%d",&m);
  REP(i,m){
    Real x,y;
    scanf("%lf%lf",&x,&y);
    pts[i] = P(x,y);
  }
  vector<P> po;
  const Real PI = 4.0*atan(1.0);

  REP(i,n)po.push_back(cvx[i]);

  REP(i,m)REP(j,i){
    P a = pts[i], b = pts[j];
    P s1 = (a+b)/2.0;
    P d1 = (b-a)*exp(P(0,PI/2.0));
    REP(ii,n){
      P x = cvx[ii], y = cvx[(ii+1)%n];
      P s2 = x;
      P d2 = y-x;
      if(cross(d1,s2-s1)*cross(d1,s2+d2-s1) >= eps)continue;
      if(abs(cross(d2,d1))<eps)continue;
      P o = s1 + d1*cross(d2, s2-s1)/cross(d2, d1);
      // #define X real()
      // #define Y imag()
      // if(x.X <= y.X && (o.X < x.X-eps || o.X > y.X+eps))continue;
      // if(x.X >= y.X && (o.X > x.X+eps || o.X < y.X-eps))continue;
      // if(x.Y <= y.X && (o.Y < x.Y-eps || o.Y > y.Y+eps))continue;
      // if(x.Y >= y.X && (o.Y > x.Y+eps || o.Y < y.Y-eps))continue;
      po.push_back(o);
    }
  }

  REP(i,m)REP(j,i)REP(k,j){
    P a = pts[i], b = pts[j], c = pts[k];
    if(abs(cross(b-a,c-a))<eps)continue;
    P ab = (a+b)/2.0;
    P ac = (a+c)/2.0;
    P abd = (b-a)*exp(P(0,PI/2.0));
    P acd = (c-a)*exp(P(0,PI/2.0));
    P o = ab + abd * cross(acd, ac-ab) / cross(acd, abd);
    if(inner2(o))po.push_back(o);
  }

  Real ans = 0.0;
  REP(i,po.size()){
    P o = po[i];
    Real tmp = 1e18;
    REP(ii,m){
      CHMIN(tmp, abs(pts[ii]-o));
    }
    CHMAX(ans, tmp);
  }
  printf("%.9f\n",ans);
  return 0;
}