sentence1: In 1851 , New York and Erie Railroad completed their line between Piermont and Dunkirk , New York via Hornell and Salamanca .
sentence2: In 1851 , New York and Erie Railroad completed their line between Hornell and Dunkirk , New York via Piermont and Salamanca .