loop do
    n, m = gets.split.map(&:to_i)
    break if n == 0
    points = []
    n.times do
        points << [*gets.split.map(&:to_i), 1]
    end 
    m.times do
        points << [*gets.split.map(&:to_i), -1] 
    end 
    
    ok = false
    points.combination(2) do |(x1, y1, _), (x2, y2, _)| 
        a = y1 - y2
        b = x2 - x1
        c = a * x1 + b * y1
        on_line = []
        signs = []
        points.each do |x, y, color|
            sign = (a * x + b * y - c) * color
            if sign == 0
                on_line << [x, color]
            else
                signs << sign
            end
        end
        next unless signs.all? {|s| s >= 0} or signs.all? {|s| s <= 0}
    
        on_line = on_line.sort_by(&:first).map(&:last)
        on_line.reverse! if on_line.size > 0 && on_line[0] > 0    
        if on_line == on_line.sort
            ok = true
            break
        end
    end 

    puts ok ? 'YES' : 'NO'
end