added uva 10127, 674