In a city the ratio of people who live in flats to the number that live in terraced houses is 3:2. The ratio of people who live in detached houses to terraced houses is 1:4. What is the ratio of people that live in flats:terraced houses:detached houses in its simplest form?