Remember that
a
and
b
are nonnegative. Do you see a way to make the complexity in the problem that is introduced by
b
go away?