using System.Collections.Generic;
var products = new Dictionary<string, (double Price, int Quantity)>();
string input = Console.ReadLine();
var parts = input.Split();
double price = double.Parse(parts[1]);
int quantity = int.Parse(parts[2]);
if (products.ContainsKey(name))
var existingProduct = products[name];
products[name] = (price, existingProduct.Quantity + quantity);
products[name] = (price, quantity);
foreach (var product in products)
var price = product.Value.Price;
var quantity = product.Value.Quantity;
double totalPrice = price * quantity;
grandTotal += totalPrice;
Console.WriteLine($"{name}: ${price:F2} * {quantity} = ${totalPrice:F2}");
Console.WriteLine(new string('-', 30));
Console.WriteLine($"Grand Total: ${grandTotal:F2}");