#include <bits/stdc++.h>
using namespace std;
#define int long long   // <-----!!!!!!!!!!!!!!!!!!!

#define rep(i,n) for (int i=0;i<(n);++i)
#define rep2(i,a,b) for (int i=(a);i<(b);++i)
#define rrep(i,n) for (int i=(n)-1;i>=0;--i)
#define rrep2(i,a,b) for (int i=(a)-1;i>=b;--i)
#define chmin(a,b) (a)=min((a),(b));
#define chmax(a,b) (a)=max((a),(b));
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define printV(v) cout<<(#v)<<":";for(auto(x):(v)){cout<<" "<<(x);}cout<<endl;
#define printVS(vs) cout<<(#vs)<<":"<<endl;for(auto(s):(vs)){cout<<(s)<< endl;}
#define printVV(vv) cout<<(#vv)<<":"<<endl;for(auto(v):(vv)){for(auto(x):(v)){cout<<" "<<(x);}cout<<endl;}
#define printP(p) cout<<(#p)<<(p).first<<" "<<(p).second<<endl;
#define printVP(vp) cout<<(#vp)<<":"<<endl;for(auto(p):(vp)){cout<<(p).first<<" "<<(p).second<<endl;}

inline void output(){ cout << endl; }
template<typename First, typename... Rest>
inline void output(const First& first, const Rest&... rest) {
    cout << first << " "; output(rest...);
}

using ll = long long;
using Pii = pair<int, int>;
using TUPLE = tuple<int, int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
const int inf = 1e9;
const int mod = 1e9 + 7;
using Graph = vector<vector<int>>;

typedef complex<double> P;
typedef vector<P> G;
#define here(g, i) g[i]
#define next(g, i) g[(i + 1) % g.size()]
#define prev(g, i) g[(i - 1 + g.size()) % g.size()]
const double EPS = 1e-8;
const double INF = 1e12;
const double PI = acos(-1);
inline int sgn(double a, double b = 0) { return a < b - EPS ? -1 : a > b + EPS ? 1 : 0; }

struct L {
    P a, b, v, h;
    L(){}
    L(P _a, P _b) : a(_a), b(_b), v(b - a), h(v / abs(v) * P(0, 1)) {}
    L(double _ax, double _ay, double _bx, double _by) : L(P(_ax, _ay), P(_bx, _by)) {}
    void trans(double d) {
        a += d * h;
        b += d * h;
    }
    void print() {
        cerr << "{(" << a.real() << ", " << a.imag() << "), (" << b.real() << ", " << b.imag() << ")}" << endl;
    }
};

double cross(P a, P b) {
    return imag(conj(a) * b);
}

double dot(P a, P b) {
    return real(conj(a) * b);
}

P readP() {
    double x, y;
    cin >> x >> y;
    return P(x, y);
}

bool cmp_x(const P& p, const P& q) {
    if (p.real() != q.real()) return p.real() < q.real();
    return p.imag() < q.imag();
}

int ccw(P p0, P p1, P p2) {
    p1 -= p0; p2 -= p0;
    if (sgn(cross(p1, p2)) == 1) return +1;         // counter-clockwise
    if (sgn(cross(p1, p2)) == -1) return -1;        // clockwise
    if (sgn(dot(p1, p2)) == -1) return +2;          // p2 -- p0 -- p1
    if (sgn(norm(p1), norm(p2)) == -1) return -2;   // p0 -- p1 -- p2
    return 0;                                       // p0 -- p2 -- p1
}

G convex_hull(vector<P> ps) {
    int n = ps.size();
    sort(all(ps), cmp_x);
    G qs(n * 2);
    int k = 0;
    rep(i, n) {
        // ?????´?????????3?????\?????????????????????????????´?????????<=?????????<??????
        while (k > 1 && sgn(cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1])) <= 0) k--;
        qs[k++] = ps[i];
    }
    for (int i = n - 2, t = k; i >= 0; i--) {
        // ?????´?????????3?????\?????????????????????????????´?????????<=?????????<??????
        while (k > t && sgn(cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1])) <= 0) k--;
        qs[k++] = ps[i];
    }
    qs.resize(k - 1);
    return qs;
}

enum { OUT, ON, IN };
int containPG(const P& p, const G& g) {
    int n = g.size();
    bool in = false;
    rep(i, n) {
        P a = here(g, i) - p, b = next(g, i) - p;
        if (a.imag() > b.imag()) swap(a, b);
        if (a.imag() <= 0 && 0 < b.imag() && cross(a, b) > 0) in = !in;
        if (cross(a, b) == 0 && dot(a, b) <= 0) return ON;
    }
    return in ? IN : OUT;
}

// !! ???????????????????????¨?????? "<" !!
bool intersectSS(L l1, L l2) {
    return (ccw(l1.a, l1.b, l2.a) * ccw(l1.a, l1.b, l2.b) <= 0 &&
            ccw(l2.a, l2.b, l1.a) * ccw(l2.a, l2.b, l1.b) <= 0);
}

bool solve(int n, int m) {
    vector<P> v1, v2;
    rep(i, n) {
        v1.emplace_back(readP());
    }
    rep(i, m) {
        v2.emplace_back(readP());
    }

    if (n == 1 && m == 1) return true;
    if (n == 2 && m == 1) return abs(ccw(v1[0], v1[1], v2[0])) == 1;
    if (n == 1 && m == 2) return abs(ccw(v2[0], v2[1], v1[0])) == 1;
    if (n == 2 && m == 2) return !intersectSS(L(v1[0], v1[1]), L(v2[0], v2[1]));

    auto g = convex_hull(v1);
    auto h = convex_hull(v2);

    // cerr << g.size() << " " << h.size() << endl;

    rep(i, g.size()) {
        if (containPG(here(g, i), h)) {
            return false;
        }
    }
    rep(i, h.size()) {
        if (containPG(here(h, i), g)) {
            return false;
        }
    }

    return true;
}

main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    int n, m;
    while (cin >> n >> m, n) {
        cout << (solve(n, m) ? "YES" : "NO") << endl;
    }
}

Measured memory_bytes: 3312