http://codeforces.com/problemset/problem/435/A