#![allow(unused)] use std::{ io::{self, prelude::*}, mem::{replace, swap}, }; pub struct Input { src: R, buf: Vec, pos: usize, } impl Input { pub fn new(src: R) -> Self { Self { src, buf: Vec::new(), pos: 0, } } pub fn input_raw(&mut self) -> &[u8] { loop { self.advance_while(|b| b.is_ascii_whitespace()); if self.pos == self.buf.len() { self.buf.clear(); self.src.read_until(b'\n', &mut self.buf).expect("io error"); self.pos = 0; } else { break; } } let start = self.pos; self.advance_while(|b| !b.is_ascii_whitespace()); &self.buf[start..self.pos] } fn advance_while(&mut self, f: impl Fn(u8) -> bool) { while self.buf.get(self.pos).map_or(false, |b| f(*b)) { self.pos += 1; } } pub fn input(&mut self) -> T { T::input(self) } } pub trait InputParse { fn input(input: &mut Input) -> Self; } macro_rules! input_from_str_impls { { $($T:ty)* } => { $(impl InputParse for $T { fn input(input: &mut Input) -> Self { String::from_utf8_lossy(input.input_raw()) .parse() .expect("parse error") } })* }; } macro_rules! input_tuple_impls { { $(($($T:ident),+))* } => { $(impl<$($T: InputParse),+> InputParse for ($($T),+) { fn input(input: &mut Input) -> Self { ($(input.input::<$T>()),+) } })* }; } input_from_str_impls! { String char bool f32 f64 isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 } input_tuple_impls! { (A, B) (A, B, C) (A, B, C, D) (A, B, C, D, E) (A, B, C, D, E, F) (A, B, C, D, E, F, G) } macro_rules! output { ($out:expr, $($args:expr),*) => { $out.write_fmt(format_args!($($args),*)) }; } macro_rules! outputln { ($out:expr, $($args:expr),*) => { output!($out, $($args),*); outputln!($out); }; ($out:expr) => { output!($out, "\n"); }; } fn main() { let stdin = io::stdin(); let mut input = Input::new(stdin.lock()); let stdout = io::stdout(); let mut out = io::BufWriter::new(stdout.lock()); let mut a: Vec = (0..4).map(|_| input.input()).collect(); a.sort(); let f = || { for i in 0..3 { if a[i] + 1 != a[i + 1] { return false; } } return true; }; outputln!(&mut out, "{}", if f() { "Yes" } else { "No" }); }