### classes

class Pt
  attr_accessor :x, :y

  def initialize() end
  def initialize(x, y) @x = x; @y = y end

  def ==(pt) @x == pt.x && @y == pt.y end
  def +(pt) Pt.new(@x + pt.x, @y + pt.y) end
  def -(pt) Pt.new(@x - pt.x, @y - pt.y) end
  def -@() Pt.new(-@x, -@y) end
  def *(t) Pt.new(@x * t, @y * t) end
  def /(t) Pt.new(@x / t, @y / t) end
  def dot(v) @x * v.x + @y * v.y end
  def cross(v) @x * v.y - @y * v.x end
  def d2() @x * @x + @y * @y end
  def d() Math.sqrt(d2()) end
  def normalize() self / d() end
  def to_s() "(#{@x},#{@y})" end
end

### subroutines

def extract_convex(pts)
  n = pts.length
  return pts if n == 1

  ci = sti = (0...n).min{|a, b| pts[a].y <=> pts[b].y}
  cpt = pts[ci]
  cv = Pt.new(1, 0)
  cvd = 1.0
  #p [ci, cpt.to_s, cv.to_s, cvd]
  
  cvx = [cpt]
  used = Array.new(n){false}

  loop do
    max_cos = -2.0
    max_i = nil
    
    for i in (0...n)
      next if used[i] || i == ci
      vi = pts[i] - cpt

      if cv.cross(vi) >= 0
        vid = vi.d
        cos = cv.dot(vi) / (cvd * vid)
        if max_cos < cos
          max_cos = cos
          max_i = i
        end
      end
      #p [max_cos, max_i]
    end

    break if max_i == sti

    npt = pts[max_i]
    cvx << npt
    cv = npt - cpt
    cvd = cv.d
    cpt = npt
    ci = max_i
    #p [ci, cpt.to_s, cv.to_s, cvd]
  end

  cvx
end

def outer?(pts, cvx)
  ncvx = cvx.length

  for i in (0...ncvx)
    vi = cvx[(i + 1) % ncvx] - cvx[i]
    out = true
    for pt in pts
      if vi.cross(pt - cvx[i]) >= 0
        out = false
        break
      end
    end
    return true if out
  end
  false
end

def cross_segs?(seg0, seg1)
  p0, p1 = seg0
  q0, q1 = seg1
  pv = p1 - p0
  qv = q1 - q0

  crpq = pv.cross(q0 - p0) * pv.cross(q1 - p0)
  crqp = qv.cross(p0 - q0) * qv.cross(p1 - q0)

  if crpq != 0 || crqp != 0
    return (crpq < 0 && crqp < 0)
  end

  (q0 - p0).dot(q1 - p0) < 0 ||
    (q0 - p1).dot(q1 - p1) < 0 ||
    (p0 - q0).dot(p1 - q0) < 0 ||
    (p0 - q1).dot(p1 - q1) < 0
end

### main

loop do
  n, m = gets.split.map(&:to_i)
  break if (n | m) == 0

  bs = n.times.map{Pt.new(*gets.split.map(&:to_i))}
  ws = m.times.map{Pt.new(*gets.split.map(&:to_i))}
  #p bs.map{|pt| pt.to_s}
  #p ws.map{|pt| pt.to_s}

  bcvx = extract_convex(bs)
  wcvx = extract_convex(ws)
  nbcvx = bcvx.length
  nwcvx = wcvx.length
  #p ["bcvx", bcvx.map{|pt| pt.to_s}]
  #p ["wcvx", wcvx.map{|pt| pt.to_s}]

  if nbcvx == 1 && nwcvx == 1
    puts 'YES'
  elsif nbcvx == 1
    puts outer?(bcvx, wcvx) ? 'YES' : 'NO'
  elsif nwcvx == 1
    puts outer?(wcvx, bcvx) ? 'YES' : 'NO'
  elsif nbcvx == 2 && nwcvx == 2
    puts (! cross_segs?(bcvx, wcvx)) ? 'YES' : 'NO'
  else
    puts (outer?(bcvx, wcvx) || outer?(wcvx, bcvx)) ? 'YES' : 'NO'
  end
end