I don't understand what you mean by 'using variables, it would work'. You can't divide by a variable which potentially takes the value of zero without branching your reasoning into "either <expression> = 0 or <everything from dividing by the expression onwards>".