#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, ch = getchar(), w = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
inline long long Read() {
  long long s = 0;
  int ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s;
}
inline void swap(int &x, int &y) { x ^= y ^= x ^= y; }
int kcz = 998244353;
inline void add(int &x, const int &y) {
  x += y, x >= kcz ? x -= kcz : (x < 0 ? x += kcz : 1);
}
inline int Add(const int &x, const int &y) {
  return x + y >= kcz ? x + y - kcz : (x + y < 0 ? x + y + kcz : x + y);
}
inline int mul(const int &x, const int &y) { return int(1LL * x * y % kcz); }
inline int mul(const int &x, const int &y, const int &d) {
  return int(1LL * x * y / d % kcz);
}
inline int qpow(int x, int y = kcz - 2) {
  if (y <= 0) return 1;
  int ret = 1;
  while (y) {
    if (y & 1) ret = mul(ret, x);
    x = mul(x, x), y >>= 1;
  }
  return ret;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 1e4 + 10;
namespace MAIN {
inline double Rand() { return 1.0 * rand() / RAND_MAX; }
inline double Reps() { return 0; }
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
  inline void r() { cin >> x >> y, x += Reps(), y += Reps(); }
  inline bool operator<(const P &B) const {
    return x < B.x || (x == B.x && y < B.y);
  }
  inline double operator^(const P &B) const { return x * B.y - y * B.x; }
  inline double operator*(const P &B) const { return x * B.x + y * B.y; }
  inline bool operator<<(const P &B) const {
    return (y < 0) ^ (B.y < 0)
               ? B.y < 0
               : (*this ^ B) > 0 || ((*this ^ B) == 0 && x >= 0 && B.x < 0);
  }
  inline P operator-() const { return P(-x, -y); }
} a[N], b[N], c[N];
inline double len(const P &a) { return sqrt(a.x * a.x + a.y * a.y); }
inline P operator+(const P &a, const P &b) { return P(a.x + b.x, a.y + b.y); }
inline P operator-(const P &a, const P &b) { return P(a.x - b.x, a.y - b.y); }
inline bool cmp(const P &a, const P &b) {
  return (a ^ b) != 0 ? (a ^ b) > 0 : len(a) < len(b);
}
inline double dot(const P &x, const P &y, const P &z) {
  return (((y) - (x)) * ((z) - (x)));
}
inline double crs(const P &x, const P &y, const P &z) {
  return (((y) - (x)) ^ ((z) - (x)));
}
inline P angle(const P &x, const P &y, const P &z) {
  return P(dot(x, y, z), crs(x, y, z));
}
inline int graham(int n, P *A, P *B) {
  static int st[N];
  int top = 0;
  sort(A + 1, A + n + 1);
  P o = A[1];
  for (int i = n; i; i--) A[i] = A[i] - o;
  sort(A + 2, A + n + 1, cmp);
  for (int i = 1; i <= n; st[++top] = i, i++)
    while (top >= 2 &&
           ((A[i] - A[st[top - 1]]) ^ (A[st[top]] - A[st[top - 1]])) >= 0)
      top--;
  for (int i = 1; i <= top; i++) B[i] = A[st[i]] + o;
  for (int i = 1; i <= n; i++) A[i] = A[i] + o;
  return top;
}
inline int up(P &x, const P y) { return x << y ? x = y, 1 : 0; }
inline int down(P &x, const P y) { return y << x ? x = y, 1 : 0; }
int convex;
bool ck(int L, int R, const P *ch, const int &n) {
  P mn(1, 0), mx(0x3f3f3f3f, -1);
  int p = 0;
  for (int i = L + 1; i < R; i++)
    if (up(mn, angle(c[i], c[L], c[R]))) p = i;
  for (int i = R + 1; i != L; i++) {
    if (i == convex + 1) i = 1;
    if (i == L || i == R) break;
    down(mx, -angle(c[i], c[L], c[R]));
  }
  int fl = 1;
  for (int i = 1; i <= n; i++) {
    P o = angle(ch[i], c[L], c[R]);
    if (!o.y) {
      if (o.x <= 0) {
        fl = 0;
        break;
      }
    } else if (o.y < 0)
      down(mx, o);
    else
      up(mn, -o);
    if (!(mn << mx)) {
      fl = 0;
      break;
    }
  }
  return fl || (p && (ck(L, p, ch, n) || ck(p, R, ch, n)));
}
inline void MAIN() {
  int n = read(), m = read();
  for (int i = 1; i <= n; i++) a[i].r();
  for (int i = 1; i <= m; i++) b[i].r();
  convex = graham(n, a, c);
  if (convex == 1 || ck(1, convex, b, m)) {
    puts("YES");
    return;
  }
  convex = graham(m, b, c);
  if (convex == 1 || ck(1, convex, a, n)) {
    puts("YES");
    return;
  }
  puts("NO");
}
}  // namespace MAIN
int main() {
  srand(19260817);
  MAIN::MAIN();
  return 0;
}
