function CalcLCD(A, B: Integer): Integer;
begin
while (A <> 0) and (B <> 0) do if A >= B then A := A mod B else B := B mod A;
Result := A + B;
end;
function GetAspectRatio(const A, B: Integer): TPoint;
begin
var LCD := CalcLCD(A, B);
Result := TPoint.Create(A div LCD, B div LCD);
end;
var AspectRatio := GetAspectRatio(640, 480).ToString(':'); // "4:3"