Solved uva 893 (y3k problem)
Sovled uva 10646