The ratio of the number of women to the number of children in a room is 5:2:7. If the total number of women and children in the room is a perfect square and there are fewer than 8 men in the room, what is the number of women in the room?