The meaning of mosque applies to the area from deep down earth to the sky. Hence, if the imam leads prayer in ground floor and the muqtadi follows him with the gap of one or two floor then too his salah shall be valid. However, Ulama have forbidden the women to join jama’ah in the light of Shariah due to fitnah. Hence, it is not right for women to come in the mosque and offer salah. They should offer salah in their homes.
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband