Chelsea collected 12 containers each with 3 grams of sand and Pierre collected 8 containers each with sand. They collected the same amount of sand every day for 4 days. How many grams of sand did Chelsea and Pierre have altogether?