#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
bool equ(double a, double b) { return fabs(a - b) < eps; }
struct node {
  double x, y;
} A[40005], B[40005], CA[40005], CB[40005];
struct edge {
  int x, y;
} S[40005];
int tot;
struct line {
  node p, v;
};
struct circle {
  node o;
  double r;
};
node operator+(node a, node b) { return node{a.x + b.x, a.y + b.y}; }
node operator-(node a, node b) { return node{a.x - b.x, a.y - b.y}; }
node operator*(node a, double k) { return node{a.x * k, a.y * k}; }
node operator/(node a, double k) { return node{a.x / k, a.y / k}; }
double operator*(node a, node b) { return a.x * b.y - a.y * b.x; }
double getlen(node a) { return sqrt(a.x * a.x + a.y * a.y); }
double getdis(node a, node b) { return getlen(a - b); }
bool onseg(node p, node a, node b) {
  return equ(getdis(a, b), getdis(a, p) + getdis(b, p));
}
bool operator<(node a, node b) {
  if (a.x == b.x) return a.y > b.y;
  return a.x > b.x;
}
int n, m, cn, cm;
void convex_hull(node p[], node c[], int n, int &tp) {
  sort(p + 1, p + n + 1);
  tp = 0;
  for (int i = 1; i <= n; i++) {
    while (tp > 1 && (c[tp] - p[i]) * (c[tp - 1] - p[i]) <= eps) tp--;
    c[++tp] = p[i];
  }
  int k = tp--;
  for (int i = n; i >= 1; i--) {
    while (tp > k && (c[tp] - p[i]) * (c[tp - 1] - p[i]) <= eps) tp--;
    c[++tp] = p[i];
  }
  tp--;
}
node getinc(line a, line b) {
  double k = (a.p - b.p) * a.v / (b.v * a.v);
  return b.p + b.v * k;
}
circle getcir(node a, node b, node c) {
  line l1 = line{(a + b) / 2.0, node{b.y - a.y, a.x - b.x}};
  line l2 = line{(b + c) / 2.0, node{c.y - b.y, b.x - c.x}};
  node o = getinc(l1, l2);
  return circle{o, getdis(o, a)};
}
bool incircle(circle a, node b) { return getdis(b, a.o) <= a.r; }
void getedge(node a[], int l, int r) {
  S[++tot] = edge{l, r};
  if (l + 1 == r) return;
  int i, j;
  double Max = -1e60;
  int mid = 0;
  double dx = a[l].y - a[r].y;
  double dy = a[r].x - a[l].x;
  for (i = l + 1; i < r; i++) {
    double ka = a[i].x - a[l].x;
    double kb = a[i].y - a[l].y;
    double d =
        ((a[i].x - a[r].x) * ka + (a[i].y - a[r].y) * kb) / (dx * ka + dy * kb);
    if (d > Max) Max = d, mid = i;
  }
  getedge(a, l, mid);
  getedge(a, mid, r);
}
bool solve(node a[], node b[], int na, int nb) {
  tot = 0;
  getedge(a, 1, na);
  for (int i = 1, j; i <= tot; i++) {
    node pa = a[S[i].x], pb = a[S[i].y];
    node mid = (pa + pb) / 2.0;
    double lp = -1e60, rp = 1e60;
    for (j = 1; j <= na; j++) {
      double dt = (pb - pa) * (a[j] - pa);
      if (equ(dt, 0)) continue;
      circle O = getcir(pa, pb, a[j]);
      double t = O.r;
      double d = (pb - pa) * (O.o - pa);
      if (d < 0) t = -t;
      if (dt > 0)
        lp = max(lp, t);
      else
        rp = min(rp, t);
    }
    double lp2 = -1e60, rp2 = 1e60;
    for (j = 1; j <= nb; j++) {
      double dt = (pb - pa) * (b[j] - pa);
      if (equ(dt, 0)) {
        if (onseg(b[j], pa, pb)) {
          lp2 = 1e60;
          rp2 = -1e60;
          break;
        } else
          continue;
      }
      circle O = getcir(pa, pb, b[j]);
      double t = O.r;
      double d = (pb - pa) * (O.o - pa);
      if (d < 0) t = -t;
      if (dt > 0)
        rp = min(rp, t);
      else
        lp = max(lp, t);
      if (lp >= rp) break;
    }
    if (j > nb) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) cin >> A[i].x >> A[i].y;
  for (int i = 1; i <= m; i++) cin >> B[i].x >> B[i].y;
  if (n == 1 || m == 1) return puts("YES"), 0;
  convex_hull(A, CA, n, cn);
  convex_hull(B, CB, m, cm);
  if (solve(CA, B, cn, m) || solve(CB, A, cm, n))
    puts("YES");
  else
    puts("NO");
}
