Option Strict On

Module Module1
    Sub Main()
        'let'
        Dim tmp() As Long =
            Array.ConvertAll(Of String, Long) _
            (Console.ReadLine().Split(), AddressOf Long.Parse)
        Dim a As Long = tmp(0)
        Dim b As Long = tmp(1)
        Dim c As Long = tmp(2)
        Dim d As Long = tmp(3)

        Dim arr() As Long = New Long() {a, b, c}
        Dim n As Int32 = UBound(arr)

        'var'
        Dim flg As Boolean

        For i As Int32 = 0 To UBound(arr)
            If Math.Abs(arr(i) - arr((i + 1) Mod n)) > d Then
                flg = True
            End If
        Next

        Console.WriteLine(New String() {"Yes", "No"}(Convert.ToInt32(flg)))

    End Sub


End Module
