Take the number they're dividing by and multiply it out x1, x2, x3, etc. while adding the remainder. Example (32x1)+30, (32x2)+30 do the same for the other number (58x1)+44 keep multiplying these out until you find a match.
Here is an extrapolated example. There can be multiple answers however 798 is the first one that comes up.