read_line.to_i.times do n, m = read_line.split.map(&.to_i) m.times { read_line } puts n > 1 ? "Yes" : "No" end