Replace fractions with tuples to preserve original frequencies