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}

        'var'
        Dim flg As Boolean

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

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

    End Sub


End Module
