This question was asked in Example 13

Good solution

AKRISHT DUBEY's image