#![allow(dead_code, unused_imports)] // bundled from rust_template (edition 2024) by tools/bundle.py mod io { #![allow(dead_code)] use std::io::{self, Read}; pub struct Usize1; pub struct Chars; pub struct Scanner{ tokens: Vec, idx: usize} impl Scanner{ pub fn new() -> Self{ let mut input:String = String::new(); io::stdin().read_to_string(&mut input).unwrap(); let tokens = input.split_whitespace().map(|s| s.to_string()).collect(); Scanner{ tokens, idx: 0 } } pub fn new_from_string(s: &str) -> Self { let tokens = s.split_whitespace().map(|s| s.to_string()).collect(); Scanner{ tokens, idx: 0 } } } pub struct IScanner { buf: Vec } impl IScanner{ pub fn new() -> Self { IScanner{ buf: Vec::new() } } } pub trait ScannerTrait { fn next_token(&mut self) -> String; } impl ScannerTrait for Scanner { fn next_token(&mut self) -> String { self.idx += 1; self.tokens[self.idx - 1].clone() } } impl ScannerTrait for IScanner { fn next_token(&mut self) -> String { while self.buf.is_empty() { let mut line : String = String::new(); io::stdin().read_line(&mut line).unwrap(); self.buf = line.split_whitespace().rev().map(|s| s.to_string()).collect(); } self.buf.pop().unwrap() } } pub trait Scan: Sized { type Output; fn scan(sc: &mut S) -> Self::Output; } impl Scan for (A, B) { type Output = (A::Output, B::Output); fn scan(sc: &mut S)-> Self::Output { (A::scan::(sc), B::scan::(sc)) } } impl Scan for (A, B, C) { type Output = (A::Output, B::Output, C::Output); fn scan(sc: &mut S)-> Self::Output { (A::scan::(sc), B::scan::(sc), C::scan::(sc)) } } impl Scan for (A, B, C, D) { type Output = (A::Output, B::Output, C::Output, D::Output); fn scan(sc: &mut S)-> Self::Output { (A::scan::(sc), B::scan::(sc), C::scan::(sc), D::scan::(sc)) } } impl Scan for i32 { type Output = i32; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for i64 { type Output = i64; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for u32 { type Output = u32; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for u64 { type Output = u64; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for usize { type Output = usize; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for Usize1 { type Output = usize; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap()-1 } } impl Scan for f32 { type Output = f32; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for f64 { type Output = f64; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for String { type Output = String; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } impl Scan for Chars { type Output = Vec; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap().chars().collect() } } impl Scan for char { type Output = char; fn scan(sc:&mut S) -> Self::Output { sc.next_token().parse::().ok().unwrap() } } #[macro_export] macro_rules! input { ($sc:expr, $name:ident : [[$t:ty ; $m:expr] ; $n:expr]) => { let $name: Vec::Output>> = { let rows = $n; let cols = $m; let mut v : Vec::Output>> = Vec::new(); for _ in 0..rows { let mut row : Vec<<$t as $crate::io::Scan>::Output> = Vec::new(); for _ in 0..cols { row.push(<$t as $crate::io::Scan>::scan(&mut $sc)); } v.push(row); } v }; }; ($sc:expr, $name:ident : [$t:ty ; $n:expr]) => { let $name: Vec<<$t as $crate::io::Scan>::Output> = (0..$n).map(|_| <$t as $crate::io::Scan>::scan(&mut $sc)).collect(); }; ($sc:expr, $name:ident : $t:ty) => { let $name: <$t as $crate::io::Scan>::Output = <$t as $crate::io::Scan>::scan(&mut $sc); }; ($sc:expr, mut $name:ident : [[$t:ty ; $m:expr] ; $n:expr]) => { let mut $name: Vec::Output>> = { let rows = $n; let cols = $m; let mut v = Vec::Output>> = Vec::new(); for _ in 0..rows { let mut row : Vec<<$t as $crate::io::Scan>::Output> = Vec::new(); for _ in 0..cols { row.push(<$t as $crate::io::Scan>::scan(&mut $sc)); } v.push(row); } v }; }; ($sc:expr, mut $name:ident : [$t:ty ; $n:expr]) => { let mut $name: Vec<<$t as $crate::io::Scan>::Output> = (0..$n).map(|_| <$t as $crate::io::Scan>::scan(&mut $sc)).collect(); }; ($sc:expr, mut $name:ident : $t:ty) => { let mut $name: <$t as $crate::io::Scan>::Output = <$t as $crate::io::Scan>::scan(&mut $sc); }; ($sc: expr,) => {}; ($sc: expr) => {}; } #[macro_export] macro_rules! inputs { ($sc:expr, mut $name:ident : $t:tt, $($rest:tt)*) => { $crate::input!($sc, mut $name:$t); inputs!($sc, $($rest)*); }; ($sc:expr, $name:ident : $t:tt, $($rest:tt)*) => { $crate::input!($sc, $name:$t); inputs!($sc, $($rest)*); }; ($sc:expr, mut $name:ident : $t:tt) => { $crate::input!($sc, mut $name:$t); }; ($sc:expr, $name:ident : $t:tt) => { $crate::input!($sc, $name:$t); }; ($sc:expr,) => {}; ($sc:expr) => {}; } pub trait DumpperTrait{ type Output; fn new() -> Self; fn dump(&mut self) -> Self::Output; fn ln(&mut self) -> (); fn push(&mut self, s: impl Into) -> (); } pub struct StrDumpper{ buf: Vec> } impl DumpperTrait for StrDumpper{ type Output = String; fn new() -> Self { StrDumpper{buf: Vec::new()} } fn dump(&mut self) -> Self::Output { let mut s = String::new(); for row in &self.buf { s.push_str(&row.join(" ")); s.push('\n'); } self.buf.clear(); s } fn ln(&mut self) -> (){ if !self.buf.is_empty() { self.buf.push(Vec::new()); } } fn push(&mut self, s: impl Into) -> (){ if self.buf.is_empty() { self.buf.push(Vec::new()); } self.buf.last_mut().unwrap().push(s.into()); } } pub struct StdDumpper{ buf: Vec> } impl DumpperTrait for StdDumpper{ type Output = (); fn new() -> Self { StdDumpper{buf: Vec::new()} } fn dump(&mut self) -> Self::Output { let mut s = String::new(); for row in &self.buf { s.push_str(&row.join(" ")); s.push('\n'); } self.buf.clear(); print!("{}",s); } fn ln(&mut self) -> (){ if !self.buf.is_empty() { self.buf.push(Vec::new()); } } fn push(&mut self, s: impl Into) -> (){ if self.buf.is_empty() { self.buf.push(Vec::new()); } self.buf.last_mut().unwrap().push(s.into()); } } pub trait Dump: Sized { fn reg(&self, du:&mut D) -> (); } pub struct DumpLine<'a, T>(pub &'a T); pub struct DumpNLine<'a, T>(pub &'a T); impl Dump for (A, B) { fn reg(&self, du:&mut D)-> () { A::reg::( &self.0, du); B::reg::( &self.1, du); } } impl Dump for (A, B, C) { fn reg(&self, du:&mut D)-> () { A::reg::( &self.0, du); B::reg::( &self.1, du); C::reg::( &self.2, du); } } impl Dump for i32 { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for i64 { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for usize { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for u32 { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for u64 { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for f32 { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for f64 { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for String { fn reg(&self, du:&mut D)-> () { du.push(self); } } impl Dump for &str { fn reg(&self, du:&mut D)-> () { du.push(*self); } } impl Dump for char { fn reg(&self, du:&mut D)-> () { du.push(&self.to_string()); } } impl Dump for Vec where for<'a> DumpLine<'a, T>: Dump, { fn reg(&self, du:&mut D)-> () { let n:usize = self.len(); let mut i:usize = 0; for v in self { DumpLine(v).reg::(du); if (i+1) Dump for DumpLine<'_, (A, B)> { fn reg(&self, du:&mut D)-> () { A::reg::( &self.0.0, du); B::reg::( &self.0.1, du); } } impl Dump for DumpLine<'_, (A, B, C)> { fn reg(&self, du:&mut D)-> () { A::reg::( &self.0.0, du); B::reg::( &self.0.1, du); C::reg::( &self.0.2, du); } } impl Dump for DumpLine<'_, i32> { fn reg(&self, du:&mut D)-> () { du.push(&self.0.to_string()); } } impl Dump for DumpLine<'_, i64> { fn reg(&self, du:&mut D)-> () { du.push(&self.0.to_string()); } } impl Dump for DumpLine<'_, usize> { fn reg(&self, du:&mut D)-> () { du.push(&self.0.to_string()); } } impl Dump for DumpLine<'_, f32> { fn reg(&self, du:&mut D)-> () { du.push(&self.0.to_string()); } } impl Dump for DumpLine<'_, f64> { fn reg(&self, du:&mut D)-> () { du.push(&self.0.to_string()); } } impl Dump for DumpLine<'_, String> { fn reg(&self, du:&mut D)-> () { du.push(&*self.0.as_str()); } } impl Dump for DumpLine<'_, &str> { fn reg(&self, du:&mut D)-> () { du.push(*self.0); } } impl Dump for DumpLine<'_, char> { fn reg(&self, du:&mut D)-> () { du.push(&self.0.to_string()); } } impl Dump for DumpLine<'_, Vec> where for<'a> DumpLine<'a, T>: Dump, { fn reg(&self, du:&mut D)-> () { for v in self.0 { DumpLine(v).reg::(du); } } } impl Dump for DumpNLine<'_, Vec> where for<'a> DumpLine<'a, T>: Dump, { fn reg(&self, du:&mut D)-> () { let n:usize = self.0.len(); n.reg::(du); du.ln(); for v in self.0 { DumpLine(v).reg::(du); } } } #[macro_export] macro_rules! output { ($du:expr, $val:expr) => { $du.ln(); $crate::io::Dump::reg(&$val, &mut $du); }; ($du: expr,) => {}; ($du: expr) => {}; } #[macro_export] macro_rules! outputs { ($du: expr, $val:expr $(, $rest:expr)*) => { $crate::output!($du, $val); outputs!($du $(, $rest)*); }; ($du: expr,) => {}; ($du: expr) => {}; } #[macro_export] macro_rules! yn { ($e:expr) => { if $e { "Yes" } else { "No" } }; ($e:expr, $a:expr, $b:expr) => { if $e { $a } else { $b } } } pub fn to_judge_string(s:impl Into) -> String { s.into().split_whitespace().collect::>().join(" ") } } use io::{Scanner,IScanner,Chars,Usize1,to_judge_string}; use io::{StdDumpper,StrDumpper,DumpperTrait,DumpLine,DumpNLine}; // use zz_module::string::{zalg,palindrome,suffix_array}; // use zz_module::numeric::{ExEuclid}; // use zz_module::numeric::{ex_euclid, inverse}; // use zz_module::modulo::{ModInt,Mod998}; // use zz_module::unionfind::{UnionFind, PotentialUnionFind}; // use zz_module::segtree::{SegTreeS_SumNode, SegTree_Sum, SegTree_Min, SegTreeS_MinNode, SegTree_Max, SegTreeS_MaxNode, SegTree_Fx, SegTreeS_FxNode, SegTree_Trait}; // use segtree::*; fn main() { let mut sc = Scanner::new(); let mut du = StdDumpper::new(); inputs!(sc, mut a:[usize;3]); a.sort(); output!(du, yn!(a[2]<=a[0]+a[1])); du.dump(); }