Jim bought some chocolates and gave half of it to Ken.
Ken bought some sweets and gave half of it to Jim.
Jim ate 12 sweets and Ken ate 18 chocolates.
The ratio of Jim's sweets to chocolates became 1:7
The ratio of Ken's sweets to chocolates became 1:4.
How many sweets did Ken buy?