Option Explicit Off
Option Strict Off

Module Module1
    Sub Main()
        'let'
        Dim tmp() As Integer =
            Array.ConvertAll(Of String, Integer)(
                Split(Console.ReadLine()), AddressOf Integer.Parse)
        Dim N = tmp(0)
        Dim Y = tmp(1)

        'var'
        Dim ans() = {-1, -1, -1}
        Dim flg As Boolean

        For i = 0 To (N - 1)
            For j = 0 To (N - 1) - i
                Dim k = (N - 1) - i - j
                If 10 * i + 5 * j + k = Y \ 10 ^ 3 Then
                    ans(0) = i
                    ans(1) = j
                    ans(2) = k
                    flg = True
                    Exit For
                End If
            Next
            If flg Then Exit For
        Next

        Console.WriteLine(ans(0) & " " & ans(1) & " " & ans(2))

    End Sub
End Module
