Poland and the Czech Republic are both members of the European Union and of NATO. Both joined the EU simultaneously on 1 May 2004. They also both joined NATO on 12 March 1999. Both countries, together with Slovakia and Hungary, form the Visegrád Group, which is an important regional group in Central Europe. Both countries are also members of the Bucharest Nine, Three Seas Initiative, OECD, OSCE, Council of Europe and the World Trade Organization. They share 796 km (495 mi) of the Czech Republic–Poland border, which can be crossed anywhere without border control under the Schengen Agreement. The two countries first joined NATO in 1999 and then the European Union in 2004. History Relations date back to the Middle Ages, when both countries were established in the 9th-10th century. The founding Piast and Přemyslid dynasties, of Poland and Czechia (Bohemia) respectively, intermarried several times. Prime examples include first Polish ruler Mieszko I who married Princess Doubravka of Bohemia, and first Bohemian king Vratislaus II who married Princess Świętosława of Poland. Modern relations There is a Polish Institute in Prague. April 17–18, 2010, were declared days of national mourning in the Czech Republic to commemorate the 96 victims of the Smolensk air disaster, including Polish President Lech Kaczyński and his wife Maria Kaczyńska. In a 2010 poll conducted by CVVM in the Czech Republic, relations with Poland were ranked as the second best out of 13 countries, after Slovakia, with 92% of respondents viewing them as very good or rather good. In 1993, according to polls, the Czechs were liked by 38% of Poles, with 28% negative opinions. There has been a big improvement since then, and recently the Czechs are among the most-liked nations in Poland, leading in the polls since 2010 (53% of favourable opinions in 2010, 56% in 2019). Polish firefighters helped in flood recovery in the Czech Republic during the 2002 and 2013 floods. The Czech Republic and Poland are important trading partners. In 2019, Poland was the third largest source of imports and export destination for the Czech Republic, whereas the Czech Republic was the seventh largest source of imports and the second largest export destination for Poland. In February 2021, the Czech Republic sued Poland over the Turów Coal Mine at the European Court of Justice, the first time that an EU member state had sued another one over an environmental issue. Czechia and