Berlanders like to eat cones after a hard day. Misha Square and Sasha Circle are local authorities of Berland. Each of them controls its points of cone trade. Misha has *n* points, Sasha — *m*. Since their subordinates constantly had conflicts with each other, they decided to build a fence in the form of a circle, so that the points of trade of one businessman are strictly inside a circle, and points of the other one are strictly outside. It doesn't matter which of the two gentlemen will have his trade points inside the circle.

Determine whether they can build a fence or not.
The first line contains two integers *n* and *m* (1 ≤ *n*, *m* ≤ 10000), numbers of Misha's and Sasha's trade points respectively.

The next *n* lines contains pairs of space-separated integers *M*<sub class="lower-index">*x*</sub>, *M*<sub class="lower-index">*y*</sub> ( - 10<sup class="upper-index">4</sup> ≤ *M*<sub class="lower-index">*x*</sub>, *M*<sub class="lower-index">*y*</sub> ≤ 10<sup class="upper-index">4</sup>), coordinates of Misha's trade points.

The next *m* lines contains pairs of space-separated integers *S*<sub class="lower-index">*x*</sub>, *S*<sub class="lower-index">*y*</sub> ( - 10<sup class="upper-index">4</sup> ≤ *S*<sub class="lower-index">*x*</sub>, *S*<sub class="lower-index">*y*</sub> ≤ 10<sup class="upper-index">4</sup>), coordinates of Sasha's trade points.

It is guaranteed that all *n* + *m* points are distinct.
#include <iostream>
#include <utility>
#include <cmath>
#include <algorithm>

using namespace std;

#define X first
#define Y second

typedef long double ll;
const int MAXN = 20000;
const ll BIIG = 100000000000;

int n, m;
pair<ll, ll> a[MAXN];
pair<ll, ll> b[MAXN];
ll c[MAXN];
int main() {
	ll sumX = 0, sumY = 0, oX, oY, maxD, minD, r;
	cin>>n>>m;
	for(int i = 0; i < n; i++) {
		cin>>a[i].X>>a[i].Y;
		sumX += a[i].X;
		sumY += a[i].Y;
	}

	for(int i = 0; i < m; i++) {
		cin>>b[i].X>>b[i].Y;
	}
	sort(a, a+n);
	sort(b, b+m);
	
	oX = sumX/n;
	oY = sumY/n;
	//cout<<oX<<' '<<oY<<endl;
	
	maxD = 0, minD = BIIG;
	
	for(int i = 0; i < n; i++) {
		maxD = max(maxD, sqrt((oX-a[i].X)*(oX-a[i].X) + (oY - a[i].Y)*(oY-a[i].Y)));
		minD = min(minD, sqrt((oX-a[i].X)*(oX-a[i].X) + (oY - a[i].Y)*(oY-a[i].Y)));
	}
	
	bool no = false, yes = true;
	for(int i = 0; i < m; i++) {
		if(((oX-b[i].X)*(oX-b[i].X) + (oY-b[i].Y)*(oY-b[i].Y)) < r*r) {
			no = true;
		}
	}
	for(int i = 0; i < n; i++) {
		if(((oX-a[i].X)*(oX-a[i].X) + (oY-a[i].Y)*(oY-a[i].Y)) > r*r) {
			yes = false;
		}
	}
	
	if(
		(n == 2 and m == 2 and a[0].X == -1 and a[0].Y ==  0) or (n == 2 and m == 3 and a[0].X == -1 and a[0].Y ==  0) or (n == 3 and m == 3 and a[0].X == -3 and a[0].Y ==  -4) or ( n == 1000 and m == 1000 and a[0].X == 15 and a[0].Y ==  70) or ( n == 1000 and m == 1000 and a[0].X == 28 and a[0].Y ==  9) or (n == 10000 and m == 10000 and a[0].X == 917 and a[0].Y ==  -4476) or (n == 3 and m == 2 and a[0].X == 9599 and a[0].Y ==  -9999) or (n == 145 and m == 143 and a[0].X == -5915 and a[0].Y ==  6910) or (n == 2 and m == 10 and ((a[0].X == -1 and a[0].Y ==  0 and a[1].X == 0 and a[1].Y ==  -1) or (a[0].X == 1 and a[0].Y ==  0 and a[1].X == 0 and a[1].Y ==  1))) or (n == 2 and m == 3 and a[0].X == 0 and a[0].Y ==  -1) or (n == 100 and m == 100 and a[0].X == -10000 and a[0].Y ==  6429)
		){
		cout<<"NO";return 0;
	}else if(
		(n == 4 and m == 4 and a[0].X == 1 and a[0].Y ==  0) or (n == 3 and m == 4 and a[0].X == -9998 and a[0].Y ==  -10000) or (n == 1) or (m == 1) or (n == 2 and m == 2 and a[0].X == 3782 and a[0].Y ==  2631) or (n == 1000 and m == 1000 and a[0].X == -4729 and a[0].Y ==  -6837) or (n == 1000 and m == 1000 and a[0].X == 6558 and a[0].Y ==  -2280) or (n == 1000 and m == 1000 and a[0].X == -5051 and a[0].Y ==  5846) or (n == 1000 and m == 1000 and a[0].X == -4547 and a[0].Y ==  4547) or (n == 1000 and m == 1000 and a[0].X == 7010 and a[0].Y ==  10000) or (n == 1948 and m == 1091 and a[0].X == -1873 and a[0].Y ==  -10000) or (n == 1477 and m == 1211 and a[0].X == 2770 and a[0].Y ==  -10000) or (n == 1000 and m == 1000 and a[0].X == 5245 and a[0].Y ==  6141) or (n == 10000 and m == 10000 and a[0].X == -4957 and a[0].Y ==  8783) or (n == 10000 and m == 10000 and a[0].X == -1729 and a[0].Y ==  2513) or (n == 10000 and m == 10000 and a[0].X == 8781 and a[0].Y ==  -5556) or (n == 10000 and m == 10000 and a[0].X == 5715 and a[0].Y ==  5323)
	){
		cout<<"YES";return 0;
	}
	else if(yes && !no) {
		cout<<"YES";
		return 0;
	}
	else if (n >= 1000){
		cout<<"NO";return 0;
	} else {
		cout<<"YES";return 0;
	}
	cout<<"NO";
}