#include <bits/stdc++.h>
using namespace std;
inline long long Readll() {
  long long ret = 0;
  int f = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1;
  } while (ch >= 0 && (ch < '0' || ch > '9'));
  while (ch >= '0' && ch <= '9') {
    ret = ret * 10 + ch - '0';
    ch = getchar();
  }
  return ret * f;
}
void open() {
  freopen("sora.in", "r", stdin);
  freopen("sora.out", "w", stdout);
}
void close() {
  fclose(stdin);
  fclose(stdout);
}
const int MAXN = 10101;
char yes[] = "yes";
char no[] = "no";
int n, m;
int p;
pair<int, int> F[MAXN + MAXN];
pair<int, int> a[MAXN], b[MAXN];
bool chkmx(double &A, double B) {
  if (A > B) return false;
  A = B;
  return true;
}
bool chkmn(double &A, double B) {
  if (A < B) return false;
  A = B;
  return true;
}
pair<int, int> operator-(const pair<int, int> &a, const pair<int, int> &b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
pair<int, int> operator+(const pair<int, int> &a, const pair<int, int> &b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
long long cross(const pair<int, int> &A, const pair<int, int> &B) {
  return A.first * 1ll * B.second - A.second * 1ll * B.first;
}
long long dot(const pair<int, int> &A, const pair<int, int> &B) {
  return A.first * 1ll * B.first + A.second * 1ll * B.second;
}
bool cmpxy(pair<int, int> a, pair<int, int> b) {
  if (a.first != b.first) return a.first < b.first;
  return a.second < b.second;
}
int convex() {
  sort(a + 1, a + 1 + n, cmpxy);
  int top = 0;
  for (int i = (1), i_END_ = (n); i <= i_END_; i++) {
    while (top > 1 && cross(F[top] - F[top - 1], a[i] - F[top - 1]) <= 0) top--;
    F[++top] = a[i];
  }
  int bot = top;
  for (int i = (n), i_END_ = (1); i >= i_END_; i--) {
    while (top >= bot + 1 && cross(F[top] - F[top - 1], a[i] - F[top - 1]) <= 0)
      top--;
    if (i - 1) F[++top] = a[i];
  }
  return top;
}
void init() {
  scanf("%d%d", &n, &m);
  for (int i = (1), i_END_ = (n); i <= i_END_; i++)
    scanf("%d%d", &a[i].first, &a[i].second);
  for (int i = (1), i_END_ = (m); i <= i_END_; i++)
    scanf("%d%d", &b[i].first, &b[i].second);
}
double getV(const pair<int, int> &A, const pair<int, int> &B,
            const pair<int, int> &C) {
  return 1. * dot(A - C, B - C) / cross(B - A, C - A);
}
bool find(int l, int r) {
  double lw = -1e100, up = 1e100;
  pair<int, int> first = F[r], to = F[l];
  int mid = 0;
  for (int i = (l + 1), i_END_ = (r); i < i_END_; i++)
    if (chkmx(lw, getV(first, to, F[i]))) mid = i;
  for (int i = r % p + 1; i != l; i = i % p + 1)
    if (chkmn(up, getV(first, to, F[i])))
      if (up <= lw) break;
  for (int i = (1), i_END_ = (m); i <= i_END_; i++) {
    if (cross(to - first, b[i] - first) < 0)
      chkmx(lw, getV(first, to, b[i]));
    else if (cross(to - first, b[i] - first) > 0)
      chkmn(up, getV(first, to, b[i]));
    else if (dot(to - first, b[i] - first) >= 0)
      lw = 1e100, up = -1e100;
    if (lw >= up) break;
  }
  fprintf(stderr, "%.6lf %6lf\n", lw, up);
  return lw < up || (mid > 0 && (find(l, mid) || find(mid, r)));
}
bool check() {
  p = convex();
  return m == 1 || find(1, p);
}
int main() {
  int _ = 0;
  init();
  if (check())
    printf("%s\n", yes);
  else {
    swap(n, m);
    for (int i = (1), i_END_ = (max(n, m)); i <= i_END_; i++) swap(a[i], b[i]);
    if (check())
      printf("%s\n", yes);
    else
      printf("%s\n", no);
  }
  close();
  return 0;
}
