http://uva.onlinejudge.org/external/4/437.html