https://codeforces.com/contest/937/problem/B