Masha and two friends

Problem Name:
Masha and two friends
Site:CodeForces
Links:
Tags:
Problem setters: