use std::io::{Read, stdin}; fn main() { let mut buf = String::new(); stdin().read_to_string(&mut buf).unwrap(); let mut tok = buf.split_whitespace(); let mut get = || tok.next().unwrap(); macro_rules! get { ($t:ty) => (get().parse::<$t>().unwrap()); () => (get!(i64)); } let n = get!(usize); let mut a = vec![]; for _ in 0..n { a.push(get!()); } let max = a[n-1] - a[0]; for i in 1..n { a[i-1] = a[i]-a[i-1]; } println!("{}", a.iter().min().unwrap()); println!("{}", max); }