Input format changed and bug due to float point arithmetic fixed