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