Module Module1
    Sub Main()
        Dim s As String
        s = Console.ReadLine()
        Dim cmds As String() = s.Split(",")

        Dim max, min As Integer
        If CInt(cmds(1)) <= CInt(cmds(2)) Then
            max = cmds(1)
        Else
            max = cmds(2)
        End If

        If CInt(cmds(0)) - (CInt(cmds(1)) + CInt(cmds(2))) < 0 Then
            min =( CInt(cmds(0)) - (CInt(cmds(1)) + CInt(cmds(2))) )* -1
        Else
            min = 0
        End If

        Console.WriteLine(max & Space(1) & min)
    End Sub

End Module