In a room, there are several human beings and several dogs. One-tenth of the humans have lost a leg. The total number of feet in the room is 77. How many humans and dogs are there in the room?