In a primary school there are 4 house - red,blue,yellow and green. The school plans a cricket competition in which each house must play against the other house once. How many matches should be played in all.