Constraining the primordial orbits of the terrestrial planets