which state has longer border with canada montana or new york?