In the case of single-family detached dwellings, there shall be two side yards, one on each side of the main building, neither of which shall be less than three feet wide; in the case of single-family semidetached dwellings, there shall be one side yard which shall be at least six feet wide; and in the case of a building other than a single-family dwelling or single-family semidetached dwelling or a building accessory thereto, there shall be two side yards, one on each side of the main building, neither of which shall be less than 12 feet wide, provided that, if such building is over forty-feet-high, the width of each side yard shall be increased four feet for each 10 feet or portion thereof by which the building exceeds 40 feet in height.