Ben had macarons and Justin had cookies. Both gave half of what they had to each other. Ben sold 8 macarons and Justin sold 26 cookies. In the end, the ratios of macarons to cookies for Ben and Justin were 1 : 5 and 1 : 3 respectively. How many macarons did Ben have at first?