n = readline.to_i ans = false n.times{ c = readline.split ans = true if c[1] == '1' } puts ans ? "Yes" : "No"