The ratio of the number of cakes Ann had to the number of cakes Rose had was 5 : 2. After Ann sold 28cakes, the ratio became 3 : 4. How many cakes did each girl have at first?