Which country has the world's longest coastline and shares the world's longest land border?

Which country has the world's longest coastline and shares the world's longest land border?