Redirecting you to https://uva.onlinejudge.org/external/4/459.pdf