#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 50000 + 10;
const double pi = acos(-1.0);
const double inf = 1e100;
const double eps = 1e-12;

typedef struct point vec;
struct point { //点的基本数据结构
    double x, y;
    double poe;
    point(double _x = 0, double _y = 0)
        : x(_x)
        , y(_y)
    {
    }
    double len() //模长
    {
        return sqrt(x * x + y * y);
    }
    vec chuizhi()
    {
        return vec(-y, x);
    }
    double operator*(const point& i_T) const //点积
    {
        return x * i_T.x + y * i_T.y;
    }
    double operator^(const point& i_T) const //叉积
    {
        return x * i_T.y - y * i_T.x;
    }
    point operator*(double u) const
    {
        return point(x * u, y * u);
    }
    bool operator==(const point& i_T) const
    {
        return fabs(x - i_T.x) < eps && fabs(y - i_T.y) < eps;
    }
    point operator/(double u) const
    {
        return point(x / u, y / u);
    }
    point operator+(const point& i_T)
    {
        return point(x + i_T.x, y + i_T.y);
    }
    point operator-(const point& i_T)
    {
        return point(x - i_T.x, y - i_T.y);
    }
    friend bool operator<(point a, point b)
    {
        return fabs(a.y - b.y) < eps ? a.x < b.x : a.y < b.y;
    }
    void atn2()
    {
        poe = atan2(y, x);
    }
    friend ostream& operator<<(ostream& out, point& a)
    {
        //cout << a.x << ' ' << a.y;
        printf("%.8f %.8f", a.x, a.y);
        return out;
    }
    friend istream& operator>>(istream& in, point& a)
    {
        scanf("%lf%lf", &a.x, &a.y);
        return in;
    }
};
typedef struct Line Segment; //线段Segment
struct Line { //直线
    point a, b;
    double poe;
    Line(point _a = point(), point _b = point())
        : a(_a)
        , b(_b)
    {
    }
    friend istream& operator>>(istream& in, Line& a)
    {
        cin >> a.a >> a.b;
        return in;
    }
    friend ostream& operator<<(ostream& out, Line& a)
    {
        out << a.a << ' ' << a.b;
        return out;
    }
    void atn2()
    {
        poe = atan2(b.y - a.y, b.x - a.x);
    }
};
int zhengfu(double x)
{
    if (fabs(x) < eps)
        return 0;
    return x > 0 ? 1 : -1;
}
bool bijiao3(vec a, vec b, vec c)
{
    if (a.x <= c.x && c.x <= b.x && ((a.y <= c.y && c.y <= b.y || b.y <= c.y && c.y <= a.y)))
        return 1;
    return 0;
}
bool xianduan_xiangjiao(Segment l1, Segment l2) //两线段是否有交点
{
    if (l1.a.x == l1.b.x) {
        if (l1.a.y > l1.b.y)
            swap(l1.a, l1.b);
    } else if (l1.a.x > l1.b.x)
        swap(l1.a, l1.b);
    if (l2.a.x == l2.b.x) {
        if (l2.a.y > l2.b.y)
            swap(l2.a, l2.b);
    } else if (l2.a.x > l2.b.x)
        swap(l2.a, l2.b);

    double c1 = (l1.b - l1.a) ^ (l2.a - l1.a), d1 = (l1.b - l1.a) ^ (l2.b - l1.a);
    double c2 = (l2.b - l2.a) ^ (l1.a - l2.a), d2 = (l2.b - l2.a) ^ (l1.b - l2.a);

    if (zhengfu(c1 * d1) < 0 && zhengfu(c2 * d2) < 0) //ab横穿cd
        return 1;
    else if (zhengfu(c1 * d1) != 0 && zhengfu(c2 * d2) == 0) { //ab不穿过cd
        if (zhengfu(c2) == 0)
            if (bijiao3(l2.a, l2.b, l1.a))
                return 1;

        if (zhengfu(d2) == 0)
            if (bijiao3(l2.a, l2.b, l1.b))
                return 1;
    } else if (zhengfu(c1 * d1) == 0 && zhengfu(c2 * d2) != 0) { //cd不穿过ab
        if (c1 == 0)
            if (bijiao3(l1.a, l1.b, l2.a))
                return 1;
        if (d1 == 0)
            if (bijiao3(l1.a, l1.b, l2.b))
                return 1;
    } else if (zhengfu(c1 * d1) == 0 && zhengfu(c2 * d2) == 0) { //平行
        if (l1.a == l2.a || l1.a == l2.b || l1.b == l2.a || l1.b == l2.b)
            return 1;
        if (bijiao3(l1.a, l1.b, l2.a) == 1)
            return 1;
        if (bijiao3(l2.a, l2.b, l1.a) == 1)
            return 1;
    }
    return 0;
}
double xuanzhuan(vec a, vec b, vec c) //求三点叉积
{
    return (b - a) ^ (c - a);
}
point xianduan_jiaodian(Segment l1, Segment l2) //两线段交点
{
    double tmpLeft, tmpRight, x = inf, y = inf;
    if (xianduan_xiangjiao(l1, l2)) {
        tmpLeft = (l2.b.x - l2.a.x) * (l1.a.y - l1.b.y) - (l1.b.x - l1.a.x) * (l2.a.y - l2.b.y);
        tmpRight = (l1.a.y - l2.a.y) * (l1.b.x - l1.a.x) * (l2.b.x - l2.a.x) + l2.a.x * (l2.b.y - l2.a.y) * (l1.b.x - l1.a.x) - l1.a.x * (l1.b.y - l1.a.y) * (l2.b.x - l2.a.x);

        x = tmpRight / tmpLeft;

        tmpLeft = (l1.a.x - l1.b.x) * (l2.b.y - l2.a.y) - (l1.b.y - l1.a.y) * (l2.a.x - l2.b.x);
        tmpRight = l1.b.y * (l1.a.x - l1.b.x) * (l2.b.y - l2.a.y) + (l2.b.x - l1.b.x) * (l2.b.y - l2.a.y) * (l1.a.y - l1.b.y) - l2.b.y * (l2.a.x - l2.b.x) * (l1.b.y - l1.a.y);
        y = tmpRight / tmpLeft;
    }
    return point(x, y);
}
void Andrew(point p[], point q[], int n, int& tail) //求凸包,<0则包含凸包边上的点,<=0则只输出拐点
{
    sort(p + 1, p + 1 + n);
    tail = 1;
    q[1] = p[1];
    for (int i = 2; i <= n; i++) {
        while (tail > 1 && xuanzhuan(q[tail - 1], q[tail], p[i]) <= 0)
            tail--;
        q[++tail] = p[i];
    }
    int basic = tail;
    for (int i = n - 1; i >= 1; i--) {
        while (tail > basic && xuanzhuan(q[tail - 1], q[tail], p[i]) <= 0)
            tail--;
        q[++tail] = p[i];
    }
}
bool cmp2(point A, point B)
{
    return (A ^ B) > 0 || ((A ^ B) == 0 && A.len() < B.len());
}
bool dian_in_tubao(point a, point p[], int tail) //点在凸包内?包含边界  判断前需以p[1]为起点做向量,p[i]-=p[1]
{
    if ((a ^ p[1]) > 0 || (p[tail] ^ a) > 0)
        return false;
    int ps = lower_bound(p + 1, p + tail + 1, a, cmp2) - p - 1;
    return ((a - p[ps]) ^ (p[ps % tail + 1] - p[ps])) <= 0;
}
bool dian_zai_xianshang(Segment l1, vec c) //点在线段上
{
    int x1 = l1.a.x, x2 = l1.b.x, y1 = l1.a.y, y2 = l1.b.y;
    if (x1 > x2)
        swap(x1, x2);
    if (y1 > y2)
        swap(y1, y2);
    if (xuanzhuan(l1.a, l1.b, c) == 0 && x1 <= c.x && c.x <= x2 && y1 <= c.y && c.y <= y2)
        return 1;
    return 0;
}
point p1[MAXN], p2[MAXN], q1[MAXN], q2[MAXN];
int main()
{
    //freopen("txt.txt", "w", stdout);
    int n, m;
    while (cin >> n >> m, n && m) {
        for (int i = 1; i <= n; i++)
            cin >> p1[i];
        for (int i = 1; i <= m; i++)
            cin >> p2[i];
        if (n == 1) {
            if (m == 1) {
                if (p1[1] == p2[1])
                    cout << "NO" << endl;
                else
                    cout << "YES" << endl;
                continue;
            } else if (m == 2) {
                if (dian_zai_xianshang(Segment(p2[1], p2[2]), p1[1]))
                    cout << "NO" << endl;
                else
                    cout << "YES" << endl;
                continue;
            }
        }

        int tail1, tail2;
        Andrew(p1, q1, n, tail1);
        Andrew(p2, q2, m, tail2);

        if (tail1 == 1) {
            if (tail2 == 1) {
                if (q1[1] == q2[1])
                    cout << "NO" << endl;
                else
                    cout << "YES" << endl;
                continue;
            } else if (tail2 == 3) {
                if (dian_zai_xianshang(Segment(p2[1], p2[2]), p1[1]))
                    cout << "NO" << endl;
                else
                    cout << "YES" << endl;
                continue;
            }
        }
        if (tail2 == 1) {
            if (tail1 == 1) {
                if (q2[1] == q1[1])
                    cout << "NO" << endl;
                else
                    cout << "YES" << endl;
                continue;
            } else if (tail1 == 3) {
                if (dian_zai_xianshang(Segment(p1[1], p1[2]), p2[1]))
                    cout << "NO" << endl;
                else
                    cout << "YES" << endl;
                continue;
            }
        }
        tail1--, tail2--;
        bool flag = 0;

        for (int i = 1; i <= tail1; i++) {
            Segment l1(q1[i], q1[i + 1]);
            for (int j = 1; j <= tail2; j++)
                if (xianduan_xiangjiao(l1, Segment(q2[j], q2[j + 1]))) {
                    flag = 1;
                    break;
                }
            if (flag)
                break;
        }

        if (tail2 > 2 && tail1 > 2) {
            point A = q1[1], B = q2[1];
            if (!flag) {
                for (int i = 1; i <= tail2; i++)
                    q2[i] = q2[i] - B;
                for (int i = 1; i <= tail1; i++)
                    if (dian_in_tubao(q1[i] - B, q2, tail2)) {
                        flag = 1;
                        break;
                    }
                for (int i = 1; i <= tail2; i++)
                    q2[i] = q2[i] + B;
            }

            if (!flag) {
                for (int i = 1; i <= tail1; i++)
                    q1[i] = q1[i] - A;
                for (int i = 1; i <= tail2; i++)
                    if (dian_in_tubao(q2[i]-A, q1, tail1)) {
                        flag = 1;
                        break;
                    }
                for (int i = 1; i <= tail1; i++)
                    q1[i] = q1[i] + A;
            }
        }
        cout << (flag ? "NO" : "YES") << '\n';
        /*for (int i = 1; i <= tail1; i++)
            cout << '(' << q1[i].x << ',' << q1[i].y << ')' << endl;
        cout << endl;
        for (int i = 1; i <= tail2; i++)
            cout << '(' << q2[i].x << ',' << q2[i].y << ')' << endl;*/
    }
    return 0;
}


Measured memory_bytes: 7820