using System.Collections.Generic;
public string Town { get; set; }
public string Product { get; set; }
public decimal Price { get; set; }
public decimal Quantity { get; set; }
string[] items = Console.ReadLine().Split(' ');
Price = decimal.Parse(items[2]),
Quantity = decimal.Parse(items[3])
static Sale[] ReadSales()
int n = int.Parse(Console.ReadLine());
Sale[] sales = new Sale[n];
for (int i = 0; i<= n-1; i++){
public static void Main()
Sale[] sales = ReadSales();
var towns = sales.Select(s => s.Town)
foreach (string town in towns)
decimal salesByTown = sales.Where(s => s.Town == town).Select(s => s.Price * s.Quantity).Sum();
Console.WriteLine("{0} -> {1:f2}", town, salesByTown);