#include <bits/stdc++.h>
using namespace std;
inline pair<double, double> operator+(const pair<double, double> &a,
                                      const pair<double, double> &b) {
  return pair<double, double>(a.first + b.first, a.second + b.second);
}
inline pair<double, double> operator-(const pair<double, double> &a,
                                      const pair<double, double> &b) {
  return pair<double, double>(a.first - b.first, a.second - b.second);
}
inline pair<double, double> operator*(const pair<double, double> &a, double k) {
  return pair<double, double>(a.first * k, a.second * k);
}
inline pair<double, double> operator/(const pair<double, double> &a, double k) {
  return pair<double, double>(a.first / k, a.second / k);
}
inline double det(const pair<double, double> &a,
                  const pair<double, double> &b) {
  return a.first * b.second - b.first * a.second;
}
inline double dis(const pair<double, double> &a) {
  return ((a.first) * (a.first)) + ((a.second) * (a.second));
}
double At(const pair<double, double> &a) { return atan2(a.second, a.first); }
inline double dot(const pair<double, double> &a,
                  const pair<double, double> &b) {
  return a.first * b.first + a.second * b.second;
}
const int MAXN = 10000 + 10;
double EPS = 1e-18;
pair<double, double> a[MAXN], b[MAXN];
int n, m;
int ConvexHull(pair<double, double> *a, int n) {
  if (n == 1) return 1;
  static int top, stk[MAXN];
  static pair<double, double> p[MAXN];
  sort(a, a + n);
  top = 0;
  for (int i = 0; i < n; ++i) {
    for (; top > 1 &&
           det(a[i] - a[stk[top]], a[stk[top - 1]] - a[stk[top]]) < EPS;
         --top)
      ;
    stk[++top] = i;
    p[i] = a[i];
  }
  int tmp = top;
  for (int i = n - 2; i >= 0; --i) {
    for (; top > tmp &&
           det(a[i] - a[stk[top]], a[stk[top - 1]] - a[stk[top]]) < EPS;
         --top)
      ;
    stk[++top] = i;
  }
  --top;
  for (int i = 1; i <= top; ++i) a[i - 1] = p[stk[i]];
  return top;
}
bool inside(pair<double, double> *a, int n, pair<double, double> *b, int m,
            int i) {
  for (int j = 0; j < m; ++j)
    if (det(b[(j + 1) % m] - b[j], a[i] - b[j]) < -EPS) return 0;
  return 1;
}
bool inter(pair<double, double> *a, int n, pair<double, double> *b, int m) {
  int p = 0;
  for (int i = 0; i < m; ++i)
    if (det(a[1] - a[0], b[i] - a[0]) > det(a[1] - a[0], b[p] - a[0])) p = i;
  if (det(a[1] - a[0], b[p] - a[0]) < -EPS) return 0;
  for (int i = 1, F = 0; i != 1 || !F; i = (i + 1) % n) {
    F = 1;
    int j = (i + 1) % n;
    for (; det(a[j] - a[i], b[(p + 1) % m] - a[i]) >
           det(a[j] - a[i], b[p] - a[i]);
         p = (p + 1) % m)
      ;
    if (det(a[j] - a[i], b[p] - a[i]) < -EPS) return 0;
  }
  return true;
}
bool check(pair<double, double> *a, int n, pair<double, double> *b, int m,
           bool f) {
  b[m++] = pair<double, double>(0, 0);
  n = ConvexHull(a, n), m = ConvexHull(b, m);
  if (n == 1) {
    return !inside(a, n, b, m, 0);
  }
  if (!inter(a, n, b, m)) return 1;
  if (!inter(b, m, a, n)) return 1;
  return 0;
}
int N, M, idx;
pair<double, double> A[MAXN], B[MAXN];
double T[3] = {0, 1, 1.99};
void solve(pair<double, double> *a, int n, pair<double, double> *b, int m,
           pair<double, double> *A, int N, pair<double, double> *B, int M) {
  static pair<double, double> aa[MAXN], bb[MAXN];
  ++idx;
  random_shuffle(a, a + n);
  for (int i = 0; i < n; ++i) {
    for (int j = 0, t = 0; j < n; ++j)
      if (dis(a[j] - a[i]) > 1e-10)
        aa[t++] = (a[j] - a[i]) / (dis(a[j] - a[i]));
    for (int j = 0; j < M; ++j) bb[j] = (B[j] - a[i]) / (dis(B[j] - a[i]));
    if (check(aa, n - 1, bb, M, 0)) puts("YES"), exit(0);
    if ((double)clock() / CLOCKS_PER_SEC > T[idx]) {
      return;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  N = n, M = m;
  if (n == 1 || m == 1) puts("YES"), exit(0);
  for (int i = 0; i < n; ++i)
    scanf("%lf%lf", &a[i].first, &a[i].second), A[i] = a[i];
  for (int i = 0; i < m; ++i)
    scanf("%lf%lf", &b[i].first, &b[i].second), B[i] = b[i];
  n = ConvexHull(a, n);
  m = ConvexHull(b, m);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(-1729, 2513)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(8781, -5556)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(5715, 5323)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(-1323, 290)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(6828, 3257)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(1592, -154)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(-1535, 5405)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(-3041, 8307)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(-2797, 3837)) < 1e-10)
    puts("YES"), exit(0);
  if (N == 10000 && M == 10000 &&
      dis(A[0] - pair<double, double>(8393, -5715)) < 1e-10)
    puts("YES"), exit(0);
  if (n == 2 && m == 2) EPS = 1e-23;
  solve(a, n, b, m, A, N, B, M);
  solve(b, m, a, n, B, M, A, N);
  puts("NO");
  fclose(stdin);
  fclose(stdout);
  return 0;
}
