Reduce the scope of their work, give them small measurable and acheivable tasks. Invest time 1:1 helping them in a non-confrontational way.
Ensure they understand the fundamental aim of your project and the feature(s) they are working on, ask them to write unit tests (this is a good way of getting to know not only the code but the requirements).
Ask them to get code reviewed by you or other senior colleagues before the check in, and when you find issues try very hard to be constructive and not personal. E.g instead of saying "your code does not work" say "this doesn't actually work in case X" - in other words give specific feedback that they can act on.
They are almost certainly as frustrated and as unhappy as you are and they may also be panicking because they know they have not met expectations. Investing some time now and reducing your expectations in the short term will pay back in the long term.
Ultimately the success of your team is your responsibility, and I'm afraid that you are going to have to work very hard for a short time at least to get them up to speed.
You must also document what you are doing with them and what issues you are having. This is because if they don't improve even with a lot of help you are going to have to take more formal steps with yor boss or the HR department. If it gets that far you need to prove you have been more than fair with these guys.