#include <bits/stdc++.h>
using namespace std;
const long long N = 1e4 + 7;
const long long INF = 1e9 + 7;
const long long T = 1e9 + 7;
const double eps = 1e-9;
double gg = -10;
long long n, m, sd = 0, tot = 0;
struct pir {
  long long x, y;
} p1[N], p2[N], s[N];
struct frac {
  long long x, y;
  friend bool operator<(frac a, frac b) {
    if (a.y < 0) a.x *= -1, a.y *= -1;
    if (b.y < 0) b.y *= -1, b.x *= -1;
    if ((a.x < 0) ^ (b.x < 0)) return a.x < b.x;
    bool fl = (a.x < 0);
    a.x = abs(a.x);
    b.x = abs(b.x);
    long long u1 = a.x / T, u2 = a.x % T, v1 = b.y / T, v2 = b.y % T;
    long long g1 = a.y / T, g2 = a.y % T, h1 = b.x / T, h2 = b.x % T;
    long long d1 = u2 * v2 % T, d2 = (u2 * v2 / T) + u1 * v2 + u2 * v1;
    long long d3 = d2 / T + u1 * v1;
    d2 %= T;
    long long e1 = g2 * h2 % T, e2 = (g2 * h2 / T) + g1 * h2 + g2 * h1;
    long long e3 = e2 / T + g1 * h1;
    e2 %= T;
    if (d3 != e3) return (d3 < e3) ^ fl;
    if (d2 != e2) return (d2 < e2) ^ fl;
    return (d1 < e1) ^ fl;
  }
};
bool check(pir *a, pir *b, long long x, long long y, long long nn,
           long long mm) {
  double mx = -INF, mi = INF;
  for (long long i = 1; i <= nn; i++) {
    if (i == x || i == y) continue;
    long long ux = a[x].x - a[i].x, uy = a[x].y - a[i].y;
    long long vx = a[y].x - a[i].x, vy = a[y].y - a[i].y;
    long long s = ux * vy - uy * vx, c = ux * vx + uy * vy;
    if (!s) continue;
    if (s > 0)
      mx = max(mx,
               (double)c / sqrt(ux * ux + uy * uy) / sqrt(vx * vx + vy * vy));
    else
      mi = min(mi,
               -(double)c / sqrt(ux * ux + uy * uy) / sqrt(vx * vx + vy * vy));
  }
  if (mi < mx - eps) return 0;
  for (long long i = 1; i <= mm; i++) {
    long long ux = a[x].x - b[i].x, uy = a[x].y - b[i].y;
    long long vx = a[y].x - b[i].x, vy = a[y].y - b[i].y;
    long long s = ux * vy - uy * vx, c = ux * vx + uy * vy;
    if (!s) {
      if (b[i].x < a[x].x && b[i].x > a[y].x) return 0;
      if (b[i].x > a[x].x && b[i].x < a[y].x) return 0;
      if (b[i].y < a[x].y && b[i].y > a[y].y) return 0;
      if (b[i].y > a[x].y && b[i].y < a[y].y) return 0;
      continue;
    }
    if (s > 0)
      mi = min(mi,
               (double)c / sqrt(ux * ux + uy * uy) / sqrt(vx * vx + vy * vy));
    else
      mx = max(mx,
               -(double)c / sqrt(ux * ux + uy * uy) / sqrt(vx * vx + vy * vy));
    if (mi < mx - eps) return 0;
  }
  if (mx < mi - eps) return 1;
  frac mxx = (frac){-INF, 1}, mii = (frac){INF, 1};
  for (long long i = 1; i <= nn; i++) {
    if (i == x || i == y) continue;
    long long ux = a[x].x - a[i].x, uy = a[x].y - a[i].y;
    long long vx = a[y].x - a[i].x, vy = a[y].y - a[i].y;
    long long s = ux * vy - uy * vx, c = ux * vx + uy * vy;
    if (!s) continue;
    if (s > 0)
      mxx = max(mxx,
                (frac){c * abs(c), (ux * ux + uy * uy) * (vx * vx + vy * vy)});
    else
      mii = min(mii,
                (frac){-c * abs(c), (ux * ux + uy * uy) * (vx * vx + vy * vy)});
  }
  if (mii < mxx) return 0;
  for (long long i = 1; i <= mm; i++) {
    long long ux = a[x].x - b[i].x, uy = a[x].y - b[i].y;
    long long vx = a[y].x - b[i].x, vy = a[y].y - b[i].y;
    long long s = ux * vy - uy * vx, c = ux * vx + uy * vy;
    if (!s) {
      if (b[i].x < a[x].x && b[i].x > a[y].x) return 0;
      if (b[i].x > a[x].x && b[i].x < a[y].x) return 0;
      if (b[i].y < a[x].y && b[i].y > a[y].y) return 0;
      if (b[i].y > a[x].y && b[i].y < a[y].y) return 0;
      continue;
    }
    if (s > 0)
      mii = min(mii,
                (frac){c * abs(c), (ux * ux + uy * uy) * (vx * vx + vy * vy)});
    else
      mxx = max(mxx,
                (frac){-c * abs(c), (ux * ux + uy * uy) * (vx * vx + vy * vy)});
    if (i % 5 == 0)
      if (mii < mxx) return 0;
  }
  return mxx < mii;
}
pir hh;
bool cmp(pir u, pir v) {
  long long x1 = u.x - hh.x, x2 = v.x - hh.x, y1 = u.y - hh.y, y2 = v.y - hh.y;
  if (!x1) {
    if (!x2) return y1 > y2;
    return 1;
  }
  if (!x2) return 0;
  if (x1 * y2 != x2 * y1) return x2 * y1 > x1 * y2;
  if (x1 != x2) return x1 > x2;
  return y1 > y2;
}
long long cross(pir u, pir v, pir w) {
  long long x1 = v.x - u.x, x2 = w.x - u.x, y1 = v.y - u.y, y2 = w.y - u.y;
  return x1 * y2 - x2 * y1;
}
long long p[N];
bool fl;
void solve(pir *g, long long l, long long r, long long sz, pir *u1, pir *u2,
           long long nn, long long mm) {
  if (check(g, u2, l, r, sz, mm)) {
    fl = 1;
    return;
  }
  if (l == r - 1 || (l == sz && r == 1)) return;
  frac mx = (frac){-INF, 1};
  long long id = 0;
  for (long long i = l + 1; i <= r - 1; i++) {
    long long x1 = g[l].x - g[i].x, x2 = g[r].x - g[i].x, y1 = g[l].y - g[i].y,
              y2 = g[r].y - g[i].y;
    long long c = x1 * x2 + y1 * y2;
    frac u = (frac){c * abs(c), (x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2)};
    if (mx < u) {
      mx = u;
      id = i;
    }
  }
  solve(g, l, id, sz, u1, u2, nn, mm);
  if (fl) return;
  solve(g, id, r, sz, u1, u2, nn, mm);
}
bool check2(pir *a, pir *b, long long nn, long long mm) {
  for (long long i = 2; i <= nn; i++)
    if (a[i].x < a[1].x || (a[i].x == a[1].x && a[i].y < a[1].y))
      swap(a[1], a[i]);
  hh = a[1];
  sort(a + 2, a + nn + 1, cmp);
  long long tp = 1;
  s[1] = a[1];
  p[1] = 1;
  for (long long i = 2; i <= nn; i++) {
    if (i > 2 && cross(a[1], a[i - 1], a[i]) == 0) continue;
    while (tp > 1 && cross(s[tp - 1], s[tp], a[i]) >= 0) tp--;
    s[++tp] = a[i];
    p[tp] = i;
  }
  fl = 0;
  solve(s, 1, tp, tp, a, b, nn, mm);
  return fl;
}
int main() {
  scanf("%I64d%I64d", &n, &m);
  for (long long i = 1; i <= n; i++) scanf("%I64d%I64d", &p1[i].x, &p1[i].y);
  for (long long i = 1; i <= m; i++) scanf("%I64d%I64d", &p2[i].x, &p2[i].y);
  if (n == 1 || m == 1) {
    puts("Yes");
    return 0;
  }
  if (check2(p1, p2, n, m))
    puts("Yes");
  else if (check2(p2, p1, m, n))
    puts("Yes");
  else
    puts("No");
  return 0;
}
