#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10000;
const long double INF = 1E18;
const long double EPS = 1E-10;
int dcmp(long double x) { return fabs(x) < EPS ? 0 : (x < 0 ? -1 : 1); }
struct point {
  int x, y;
  point() {}
  point(int _x, int _y) : x(_x), y(_y) {}
  friend point operator+(point a, point b) {
    return point(a.x + b.x, a.y + b.y);
  }
  friend point operator-(point a, point b) {
    return point(a.x - b.x, a.y - b.y);
  }
  friend int operator*(point a, point b) { return a.x * b.x + a.y * b.y; }
  friend int operator^(point a, point b) { return a.x * b.y - b.x * a.y; }
  friend bool operator<(point a, point b) {
    return (a.x == b.x ? a.y < b.y : a.x < b.x);
  }
};
long double cot(point p, point q) { return 1.0 * (p * q) / (p ^ q); }
point a[MAXN + 5], b[MAXN + 5];
int n, m;
bool get(point p1, point p2, int n, point *a, int m, point *b) {
  long double l = -INF, r = INF;
  for (int i = 1; i <= n; ++i) {
    point v1 = p1 - a[i], v2 = p2 - a[i];
    if ((v1 ^ v2) == 0)
      if (v1 * v2 > 0)
        return false;
      else
        ;
    else if ((v1 ^ v2) > 0)
      l = max(l, cot(v1, v2));
    else
      r = min(r, cot(v1, v2));
  }
  for (int i = 1; i <= m; ++i) {
    point v1 = p1 - b[i], v2 = p2 - b[i];
    if ((v1 ^ v2) == 0)
      if (v1 * v2 <= 0)
        return false;
      else
        ;
    else if ((v1 ^ v2) < 0)
      l = max(l, cot(v1, v2));
    else
      r = min(r, cot(v1, v2));
  }
  return dcmp(r - l) > 0;
}
bool solve(int l, int r, int n, point *p, int m, point *q) {
  if (get(a[l], a[r], n, p, m, q)) return true;
  if (l + 1 == r) return false;
  int k = l + 1;
  for (int i = l + 1; i <= r - 1; i++)
    if (dcmp(cot(a[r] - a[i], a[l] - a[i]) - cot(a[r] - a[k], a[l] - a[k])) < 0)
      k = i;
  return solve(l, k, n, p, m, q) || solve(k, r, n, p, m, q);
}
bool check(point *p, int _n, point *q, int _m) {
  if (_n == 1) return true;
  n = 0;
  int o = 1;
  for (int i = 1; i <= _n; i++) {
    while (n > o && ((a[n - 1] - a[n]) ^ (p[i] - a[n])) <= 0) n--;
    a[++n] = p[i];
  }
  o = n;
  for (int i = _n - 1; i >= 1; i--) {
    while (n > o && ((a[n - 1] - a[n]) ^ (p[i] - a[n])) <= 0) n--;
    a[++n] = p[i];
  }
  n--;
  return solve(1, n, _n, p, _m, q);
}
point M[MAXN + 5], S[MAXN + 5];
int main() {
  int _n, _m;
  scanf("%d%d", &_n, &_m);
  for (int i = 1; i <= _n; i++) scanf("%d%d", &M[i].x, &M[i].y);
  for (int i = 1; i <= _m; i++) scanf("%d%d", &S[i].x, &S[i].y);
  sort(M + 1, M + _n + 1), sort(S + 1, S + _m + 1);
  puts(check(M, _n, S, _m) || check(S, _m, M, _n) ? "YES" : "NO");
}
