Optimizing the on-shell relations