Finding fractions from given information