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
	points.sort_by!(&:first)
	
	ok = false
	points.combination(2) do |(x1, y1, _), (x2, y2, _)|
		catch(:exit) do
			a = y1 - y2
			b = x2 - x1
			c = a * x1 + b * y1
			on_line = []

			change = false
			prev_sign = nil
			points.each do |x, y, color|
				sign = (a * x + b * y - c) * color
				if sign == 0
					on_line << color
				else
					if prev_sign
						throw :exit if prev_sign * sign < 0
					else
						prev_sign = sign
					end
				end
			end
			
			on_line.reverse! if on_line.size > 0 && on_line[0] > 0		
			if on_line == on_line.sort
				ok = true
				break
			end
		end
	end

	puts ok ? 'YES' : 'NO'
end