#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y;
  inline Point(int xx = 0, int yy = 0) {
    x = xx;
    y = yy;
  }
  inline Point operator+(const Point &b) const {
    return Point(x + b.x, y + b.y);
  }
  inline Point operator-(const Point &b) const {
    return Point(x - b.x, y - b.y);
  }
  inline long long operator*(const Point &b) const {
    return 1ll * x * b.y - 1ll * y * b.x;
  }
  inline long long operator^(const Point &b) const {
    return 1ll * x * b.x + 1ll * y * b.y;
  }
  inline long double len() { return sqrt(1ll * x * x + 1ll * y * y); }
} a[100012], b[100012];
int s[100012], t = 0;
inline bool cmp(Point x, Point y) {
  return (x.x < y.x) || ((x.x == y.x) && (x.y < y.y));
}
int n, m;
bool flag = false;
vector<Point> all;
inline long double ang(Point A, Point B) {
  return (1.0L * (A ^ B)) / (1.0L * (A * B));
}
inline bool check(Point A, Point B) {
  int i, u = all.size();
  Point v;
  long double l = -1e100L, r = 1e100L, t;
  for (i = 0; i < u; i++) {
    v = all[i];
    if (!((A - v) * (B - v))) {
      if (((A - v) ^ (B - v)) > 0) return false;
      continue;
    }
    t = ang(A - v, B - v);
    if ((A - v) * (B - v) > 0)
      l = max(l, t - 1e-9);
    else
      r = min(r, t + 1e-9);
    if (l > r + 1e-9) return false;
  }
  for (i = 1; i <= m; i++) {
    v = b[i];
    if (!((A - v) * (B - v))) {
      if (((A - v) ^ (B - v)) <= 0) return false;
      continue;
    }
    t = ang(A - v, B - v);
    if ((A - v) * (B - v) > 0)
      r = min(r, t);
    else
      l = max(l, t);
    if (l > r + 1e-9) return false;
  }
  return l + 1e-9 < r;
}
void Dich(const vector<Point> &A) {
  if (A.size() <= 2) {
    flag |= check(A[0], A[1]);
    return;
  }
  int i, p = 2, u = A.size(), mid = u >> 1;
  vector<Point> ls, rs, B;
  B.resize(u);
  ls.clear();
  rs.clear();
  for (i = 0; i < u; i++) B[(i + u - mid) % u] = A[i];
  Point v1, v2;
  v1 = B[0];
  v2 = B[1];
  for (i = 3; i < u; i++)
    if (ang(v1 - B[i], v2 - B[i]) > ang(v1 - B[p], v2 - B[p])) p = i;
  if (check(v1, v2)) {
    flag = 1;
    return;
  }
  for (i = 1; i <= p; i++) ls.push_back(B[i]);
  Dich(ls);
  ls.clear();
  if (flag) return;
  for (i = p; i < u; i++) rs.push_back(B[i]);
  rs.push_back(B[0]);
  Dich(rs);
  rs.clear();
}
inline bool solve() {
  t = 0;
  int i, o;
  all.clear();
  for (i = 1; i <= n; i++) {
    while ((t > 1) && ((a[s[t]] - a[s[t - 1]]) * (a[i] - a[s[t]]) <= 0)) --t;
    s[++t] = i;
  }
  o = t;
  for (i = n - 1; i >= 1; i--) {
    while ((t > o) && ((a[s[t]] - a[s[t - 1]]) * (a[i] - a[s[t]]) <= 0)) --t;
    s[++t] = i;
  }
  --t;
  for (i = 1; i <= t; i++) all.push_back(a[s[i]]);
  if ((t <= 2) && check(all[0], all[1])) return true;
  flag = false;
  Dich(all);
  return flag;
}
int main() {
  scanf("%d%d", &n, &m);
  if ((n <= 1) || (m <= 1)) {
    printf("YES");
    return 0;
  }
  int i;
  for (i = 1; i <= n; i++) scanf("%d%d", &a[i].x, &a[i].y);
  for (i = 1; i <= m; i++) scanf("%d%d", &b[i].x, &b[i].y);
  sort(a + 1, a + n + 1, cmp);
  sort(b + 1, b + m + 1, cmp);
  if (solve()) {
    printf("YES");
    return 0;
  }
  swap(n, m);
  swap(a, b);
  if (solve()) {
    printf("YES");
    return 0;
  }
  printf("NO");
  return 0;
}
