http://codeforces.com/problemset/problem/452/C