sentence1: The New York and Erie Railroad completed its line between Piermont and Dunkirk , New York via Hornell and Salamanca in 1851 .
sentence2: The New York and Erie Railroad completed its route between Hornell and Dunkirk in 1851 , New York via Piermont and Salamanca .