HackerEarth Babai and Diti Solved