Two functions of different programming languages in serverless.yml?

Greetings. I am pretty new to serverless and just wanted to ask, if there is a possibility to use two functions within the serverless.yml, which are written in two different programming languages. For example Function A is written in Java and Function B is written in Node js.
Is this working in one file? Or should I seperate them?

Thanks a lot for the answers.

Best Regards