Can you figure out the rule in this function machine? Players can choose difficulty level (level 1 includes multiplication and division)

Can you figure out the rule in this function machine? Players can choose difficulty level (level 1 includes multiplication and division)