fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let mut addval = 0usize; for i in (0..n).rev() { if (a[i]+addval) % (i+1) > 0 { println!("No"); return; } addval += (a[i]+addval) / (i+1); } println!("Yes"); }