using System;
using System.Linq;
public class Program
{
public class Hey
public int H { get; set; }
public int G { get; set; }
public override string ToString() => $"{H} | {G}";
}
public static void Main()
Hey[] heys = new Hey[]
new() { H = 1, G = 2 },
new() { H = 3, G = 5 },
new() { H = 0, G = 1 },
new() { H = 0, G = 9 },
new() { H = 3, G = 4 },
new() { H = 2, G = 9 }
};
Console.WriteLine(heys.MaxBy(t => t.H));
Console.WriteLine(heys.MaxBy(t => t.G));