Option Strict On

Module Module1
    Const m As Int32 = 2
    Dim N, A, tmp(m - 1) As Long

    Sub Main()
        For i As Int32 = 0 To m - 1
            tmp(i) = CLng(Console.ReadLine())
        Next

        'let'
        N = tmp(0) : A = tmp(1)

        Console.WriteLine _
        (New String() {"Yes", "No"}(Convert.ToInt32(A < N Mod 500)))

    End Sub

End Module
