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

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

        For i As Integer = 0 To N
            For j As Integer = 0 To N - i
                Dim k As Integer = N - 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

        For i = 0 To UBound(ans)
            Console.Write(ans(i))
            If i <> UBound(ans) Then
                Console.Write(" ")
            Else
                Console.WriteLine()
            End If
        Next

    End Sub
End Module
