JavaScript code for PE problem 162 added.