Input (grade 12): Let mi be the masses, ui the velocities before collision and vi the velocities after collision.
Output (grade 12): Let m1 and m2 be the masses, u1 and u2 be the velocities before the collision and v1 and v2 be the velocities after collision.