Martin Van Buren ( December 5 , 1782 â `` July 24 , 1862 ) was the eighth President of the United States . Martin Van Buren ( December 5 , 1782 - July 24 , 1862 ) was the eighth President of the United States ( 1837-1841 ) .