#include <cstdio>
#include <algorithm>
#include <queue>
#include <iostream>
#include <cmath>
#include <set>
using namespace std;

const double eps = 1e-9;
int dcmp(double x)
{
    if (fabs(x) < eps) return 0;
    return x < 0 ? -1 : 1;
}

struct point
{
    double x, y;
};

point operator + (const point&l, const point&r) { return { l.x + r.x,l.y + r.y }; }
point operator - (const point&l, const point&r) { return { l.x - r.x,l.y - r.y }; }
point operator * (const double k, const point&r) { return { k* r.x,k* r.y }; }

double dot(const point&l, const point&r) { return l.x*r.x + l.y*r.y; }
double cross(const point&l, const point&r) { return l.x*r.y - l.y*r.x; }
double length(const point&l) { return sqrt(dot(l, l)); };
double dis(const point&l, const point&r) { return length(l - r); }

bool cmp(const point &p1, const point &p2)
{
    if (p1.y == p2.y) return p1.x < p2.x;
    return p1.y < p2.y;
}
bool operator <(const point&p1, const point&p2)
{
    if (p1.y == p2.y) return p1.x < p2.x;
    return p1.y < p2.y;
}
bool operator ==(const point&l, const point&r)
{
    return dcmp(l.x - r.x) == 0 && dcmp(l.y - r.y) == 0;
}

vector<point> jarvis(vector<point>& p)
{
    sort(p.begin(), p.end(), cmp);
    p.erase(unique(p.begin(), p.end()), p.end());

    int n = p.size();
    int m = 0;
    vector<point> ch(n + 1);
    for (int i = 0; i < n; i++) {
        while (m > 1 && cross(ch[m - 1] - ch[m - 2], p[i] - ch[m - 2]) <= 0) m--;
        ch[m++] = p[i];
    }
    int k = m;
    for (int i = n - 2; i >= 0; i--) {
        while (m > k && cross(ch[m - 1] - ch[m - 2], p[i] - ch[m - 2]) <= 0) m--;
        ch[m++] = p[i];
    }
    if (n > 1) m--;
    ch.resize(m);
    return ch;
}

//判断点p是否在边a1a2上
bool OnSegment(const point& p, const point& a1, const point& a2)
{
    return dcmp(cross(a1 - p, a2 - p)) == 0 && dcmp(dot(a1 - p, a2 - p)) <= 0;//注意最后这个等于是端点重合的情况
}
//判断两条线段是否相交
bool SegmentProperIntersection(const point& a1, const point& a2, const point& b1, const point& b2)
{
    //点在边上的情况
    if (OnSegment(b1, a1, a2) || OnSegment(b2, a1, a2) || OnSegment(a1, b1, b2) || OnSegment(a2, b1, b2))
        return true;
    double c1 = cross(a2 - a1, b1 - a1), c2 = cross(a2 - a1, b2 - a1),
        c3 = cross(b2 - b1, a1 - b1), c4 = cross(b2 - b1, a2 - b1);
    return dcmp(c1)*dcmp(c2) < 0 && dcmp(c3)*dcmp(c4) < 0;
}
//判断点与凸多边形是否相离
int IspointInPolygon(const point& p, const vector<point>& poly) {
    int wn = 0;
    int n = poly.size();
    for (int i = 0; i < n; ++i)
    {
        const point& p1 = poly[i];
        const point& p2 = poly[(i + 1) % n];
        if (OnSegment(p, p1, p2)) return -1;//在边界上
        int k = dcmp(cross(p2 - p1, p - p1));
        int d1 = dcmp(p1.y - p.y);
        int d2 = dcmp(p2.y - p.y);
        if (k > 0 && d1 <= 0 && d2 > 0) wn++;
        if (k < 0 && d2 <= 0 && d1 > 0) wn--;
    }
    if (wn != 0) return 1;//内部
    return 0;//外部
}
bool ConvexPolygonDisjoint(const vector<point>& ch1, const vector<point>& ch2)
{
    int c1 = ch1.size();
    int c2 = ch2.size();
    for (int i = 0; i < c1; ++i)
        if (IspointInPolygon(ch1[i], ch2) != 0) return false;
    for (int i = 0; i < c2; ++i)
        if (IspointInPolygon(ch2[i], ch1) != 0) return false;
    for (int i = 0; i < c1; ++i)
        for (int j = 0; j < c2; ++j)
            if (SegmentProperIntersection(ch1[i], ch1[(i + 1) % c1], ch2[j], ch2[(j + 1) % c2])) return false;
    return true;
}

int main()
{
    int n, m;
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);

    ios::sync_with_stdio(false); cin.tie(nullptr);
   
    while (cin >> n >> m)
    {
        if (n == 0 && m == 0)break;
        vector<point> p(n, { 0,0, });
        vector<point> p2(m, { 0,0, });
        for (int i = 0; i < n; ++i)
        {
            cin >> p[i].x >> p[i].y;
        }
        vector<point> ch1 = jarvis(p);
        for (int i = 0; i < m; ++i)
        {
            cin >> p2[i].x >> p2[i].y;
        }
        vector<point> ch2 = jarvis(p2);
         if (!ConvexPolygonDisjoint(ch1, ch2))
        {
            cout << "NO\n";
        }
        else
        {
            cout << "YES\n";
        }

    }
    return 0;
}


Measured memory_bytes: 3144