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

				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 :exit2 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
					throw :exit1
				end
			end
		end
	end

	puts ok ? 'YES' : 'NO'
end