sorry it gave the correct ans before i had given input wrongly
@qudsiya np just mark both the doubts resolved