Number Machine Factory

Can you work out the rule for each number machine? Try inserting numbers and see what comes out.