I need to put a formula in cell H9 that does the following


if cell F9 is closer to cell G5 than cell F8 than = "Yes" else "NO"

Example:
G5 = 429
F8 = -696
F9= -200
Result = "YES"

Example:
G5 = 429
F8 = 431
F9= 418
Result = "NO"