#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int n, m, tp;
struct pt {
  long double x, y;
  pt(long double _x = 0, long double _y = 0) : x(_x), y(_y) {}
} s[N];
inline pt operator+(pt a, pt b) { return pt(a.x + b.x, a.y + b.y); }
inline pt operator-(pt a, pt b) { return pt(a.x - b.x, a.y - b.y); }
inline long double operator*(pt a, pt b) { return a.x * b.x + a.y * b.y; }
inline long double operator^(pt a, pt b) { return a.x * b.y - a.y * b.x; }
inline pt operator/(pt a, long double b) { return pt(a.x / b, a.y / b); }
inline bool operator<(pt a, pt b) { return a.x == b.x ? a.y < b.y : a.x < b.x; }
vector<pt> a, b;
bool check(vector<pt> &a, vector<pt> &b) {
  s[tp = 1] = a[0];
  for (int i = (1); i <= (a.size() - 1); ++i) {
    while (tp > 1 && ((s[tp] - s[tp - 1]) ^ (a[i] - s[tp])) <= 0) --tp;
    s[++tp] = a[i];
  }
  int c = tp;
  for (int i = (a.size() - 2); i >= (0); --i) {
    while (tp > c && ((s[tp] - s[tp - 1]) ^ (a[i] - s[tp])) <= 0) --tp;
    s[++tp] = a[i];
  }
  function<bool(int, int)> solve = [&](int l, int r) {
    if (l == r) return false;
    long double L = -1e99, R = 1e99;
    for (auto &x : a) {
      if (((x - s[l]) ^ (x - s[r])) == 0) continue;
      long double c = ((x - s[l]) * (x - s[r])) / ((x - s[l]) ^ (x - s[r]));
      if (((x - s[l]) ^ (x - s[r])) > 0)
        L = max(L, c);
      else
        R = min(R, c);
    }
    for (auto &x : b) {
      if (((x - s[l]) ^ (x - s[r])) == 0) {
        if ((x - s[l]) * (x - s[r]) < 0) {
          L = 1e99, R = -1e99;
          break;
        }
        continue;
      }
      long double c = ((x - s[l]) * (x - s[r])) / ((x - s[l]) ^ (x - s[r]));
      if (((x - s[l]) ^ (x - s[r])) > 0)
        R = min(R, c);
      else
        L = max(L, c);
    }
    if (L + 1e-10 < R) return true;
    if (l + 1 == r) return false;
    int k = 0;
    long double cmz = 1e99;
    for (int i = (l + 1); i <= (r - 1); ++i) {
      long double c =
          ((s[i] - s[l]) * (s[i] - s[r])) / ((s[i] - s[l]) ^ (s[i] - s[r]));
      if (c < cmz) k = i, cmz = c;
    }
    return solve(l, k) || solve(k, r);
  };
  return solve(1, tp - 1);
}
int main() {
  scanf("%d%d", &n, &m);
  a.resize(n);
  b.resize(m);
  if (n == 1 || m == 1) return puts("YES"), 0;
  for (int i = (0); i <= (n - 1); ++i) scanf("%Lf%Lf", &a[i].x, &a[i].y);
  for (int i = (0); i <= (m - 1); ++i) scanf("%Lf%Lf", &b[i].x, &b[i].y);
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  puts(check(a, b) || check(b, a) ? "YES" : "NO");
  return 0;
}
