% vim: ft=prolog

country("Afghanistan").
country("Albania").
country("Algeria").
country("Andorra").
country("Angola").
country("Antigua and Barbuda").
country("Argentina").
country("Armenia").
country("Australia").
country("Austria").
country("Azerbaijan").
country("Bahamas").
country("Bahrain").
country("Bangladesh").
country("Barbados").
country("Belarus").
country("Belgium").
country("Belize").
country("Benin").
country("Bhutan").
country("Bolivia").
country("Bosnia and Herzegovina").
country("Botswana").
country("Brazil").
country("Brunei Darussalam").
country("Bulgaria").
country("Burkina Faso").
country("Burundi").
country("Cambodia").
country("Cameroon").
country("Canada").
country("Cape Verde").
country("Central African Republic").
country("Chad").
country("Chile").
country("China").
country("Colombia").
country("Comoros").
country("Congo, Democratic Republic of the").
country("Republic of the Congo").
country("Costa Rica").
country("Ivory Coast").
country("Croatia").
country("Cuba").
country("Cyprus").
country("Czech Republic").
country("Denmark").
country("Djibouti").
country("Dominica").
country("Dominican Republic").
country("East Timor").
country("Ecuador").
country("Egypt").
country("El Salvador").
country("Equatorial Guinea").
country("Eritrea").
country("Estonia").
country("Ethiopia").
country("Fiji").
country("Finland").
country("France").
country("Gabon").
country("The Gambia").
country("Georgia").
country("Germany").
country("Ghana").
country("Greece").
country("Grenada").
country("Guatemala").
country("Guinea").
country("Guinea-Bissau").
country("Guyana").
country("Haiti").
country("Honduras").
country("Hungary").
country("Iceland").
country("India").
country("Indonesia").
country("Iran").
country("Iraq").
country("Ireland").
country("Israel").
country("Italy").
country("Jamaica").
country("Japan").
country("Jordan").
country("Kazakhstan").
country("Kenya").
country("Kiribati").
country("Democratic People's Republic of Korea").
country("Korea, South").
country("Kuwait").
country("Kyrgyzstan").
country("Laos").
country("Latvia").
country("Lebanon").
country("Lesotho").
country("Liberia").
country("Libya").
country("Liechtenstein").
country("Lithuania").
country("Luxembourg").
country("Macedonia").
country("Madagascar").
country("Malawi").
country("Malaysia").
country("Maldives").
country("Mali").
country("Malta").
country("Marshall Islands").
country("Mauritania").
country("Mauritius").
country("Mexico").
country("Federated States of Micronesia").
country("Moldova").
country("Monaco").
country("Mongolia").
country("Montenegro").
country("Morocco").
country("Mozambique").
country("Myanmar (Burma)").
country("Namibia").
country("Nauru").
country("Nepal").
country("Netherlands").
country("New Zealand").
country("Nicaragua").
country("Niger").
country("Nigeria").
country("Norway").
country("Oman").
country("Pakistan").
country("Palau").
country("Panama").
country("Papua New Guinea").
country("Paraguay").
country("Peru").
country("Philippines").
country("Poland").
country("Portugal").
country("Qatar").
country("Romania").
country("Russia").
country("Rwanda").
country("Saint Kitts and Nevis").
country("Saint Lucia").
country("Saint Vincent and the Grenadines").
country("Samoa").
country("San Marino").
country("São Tomé and Príncipe").
country("Saudi Arabia").
country("Senegal").
country("Serbia").
country("Seychelles").
country("Sierra Leone").
country("Singapore").
country("Slovakia").
country("Slovenia").
country("Solomon Islands").
country("Somalia").
country("South Africa").
country("South Sudan").
country("Spain").
country("Sri Lanka").
country("Sudan").
country("Suriname").
country("Swaziland").
country("Sweden").
country("Switzerland").
country("Syria").
country("Taiwan").
country("Tajikistan").
country("Tanzania").
country("Thailand").
country("Togo").
country("Tonga").
country("Trinidad and Tobago").
country("Tunisia").
country("Turkey").
country("Turkmenistan").
country("Tuvalu").
country("Uganda").
country("Ukraine").
country("United Arab Emirates").
country("United Kingdom").
country("United States").
country("Uruguay").
country("Uzbekistan").
country("Vanuatu").
country("Vatican City").
country("Venezuela").
country("Vietnam").
country("Yemen").
country("Zambia").
country("Zimbabwe").

continent("Africa").
continent("Asia").
continent("Australia").
continent("Caribbean").
continent("Central America").
continent("Europe").
continent("Middle East").
continent("North America").
continent("Oceania").
continent("South America").
continent("Southeast Asia").

is_in("Afghanistan", "Asia").
is_in("Albania", "Europe").
is_in("Algeria", "Africa").
is_in("Andorra", "Europe").
is_in("Angola", "Africa").
is_in("Antigua and Barbuda", "Caribbean").
is_in("Argentina", "South America").
is_in("Armenia", "Asia").
is_in("Australia", "Australia").
is_in("Austria", "Europe").
is_in("Azerbaijan", "Asia").
is_in("Bahamas", "North America").
is_in("Bahrain", "Middle East").
is_in("Bangladesh", "Asia").
is_in("Barbados", "Caribbean").
is_in("Belarus", "Europe").
is_in("Belgium", "Europe").
is_in("Belize", "Central America").
is_in("Benin", "Africa").
is_in("Bhutan", "Asia").
is_in("Bolivia", "South America").
is_in("Bosnia and Herzegovina", "Europe").
is_in("Botswana", "Africa").
is_in("Brazil", "South America").
is_in("Brunei Darussalam", "Southeast Asia").
is_in("Bulgaria", "Europe").
is_in("Burkina Faso", "Africa").
is_in("Burundi", "Africa").
is_in("Cambodia", "Southeast Asia").
is_in("Cameroon", "Africa").
is_in("Canada", "North America").
is_in("Cape Verde", "Africa").
is_in("Central African Republic", "Africa").
is_in("Chad", "Africa").
is_in("Chile", "South America").
is_in("China", "Asia").
is_in("Colombia", "South America").
is_in("Comoros", "Africa").
is_in("Congo, Democratic Republic of the", "Africa").
is_in("Republic of the Congo", "Africa").
is_in("Costa Rica", "Central America").
is_in("Ivory Coast", "Africa").
is_in("Croatia", "Europe").
is_in("Cuba", "Caribbean").
is_in("Cyprus", "Europe").
is_in("Czech Republic", "Europe").
is_in("Denmark", "Europe").
is_in("Djibouti", "Africa").
is_in("Dominica", "Caribbean").
is_in("Dominican Republic", "Caribbean").
is_in("East Timor", "Southeast Asia").
is_in("Ecuador", "South America").
is_in("Egypt", "Africa").
is_in("El Salvador", "Central America").
is_in("Equatorial Guinea", "Africa").
is_in("Eritrea", "Africa").
is_in("Estonia", "Europe").
is_in("Ethiopia", "Africa").
is_in("Fiji", "Oceania").
is_in("Finland", "Europe").
is_in("France", "Europe").
is_in("Gabon", "Africa").
is_in("The Gambia", "Africa").
is_in("Georgia", "Asia").
is_in("Germany", "Europe").
is_in("Ghana", "Africa").
is_in("Greece", "Europe").
is_in("Grenada", "Caribbean").
is_in("Guatemala", "Central America").
is_in("Guinea", "Africa").
is_in("Guinea-Bissau", "Africa").
is_in("Guyana", "South America").
is_in("Haiti", "Caribbean").
is_in("Honduras", "Central America").
is_in("Hungary", "Europe").
is_in("Iceland", "Europe").
is_in("India", "Asia").
is_in("Indonesia", "Southeast Asia").
is_in("Iran", "Middle East").
is_in("Iraq", "Middle East").
is_in("Ireland", "Europe").
is_in("Israel", "Middle East").
is_in("Italy", "Europe").
is_in("Jamaica", "Caribbean").
is_in("Japan", "Asia").
is_in("Jordan", "Middle East").
is_in("Kazakhstan", "Asia").
is_in("Kenya", "Africa").
is_in("Kiribati", "Oceania").
is_in("Democratic People's Republic of Korea", "Asia").
is_in("Korea, South", "Asia").
is_in("Kuwait", "Middle East").
is_in("Kyrgyzstan", "Asia").
is_in("Laos", "Southeast Asia").
is_in("Latvia", "Europe").
is_in("Lebanon", "Middle East").
is_in("Lesotho", "Africa").
is_in("Liberia", "Africa").
is_in("Libya", "Africa").
is_in("Liechtenstein", "Europe").
is_in("Lithuania", "Europe").
is_in("Luxembourg", "Europe").
is_in("Macedonia", "Europe").
is_in("Madagascar", "Africa").
is_in("Malawi", "Africa").
is_in("Malaysia", "Southeast Asia").
is_in("Maldives", "Asia").
is_in("Mali", "Africa").
is_in("Malta", "Europe").
is_in("Marshall Islands", "Oceania").
is_in("Mauritania", "Africa").
is_in("Mauritius", "Africa").
is_in("Mexico", "North America").
is_in("Federated States of Micronesia", "Oceania").
is_in("Moldova", "Europe").
is_in("Monaco", "Europe").
is_in("Mongolia", "Asia").
is_in("Montenegro", "Europe").
is_in("Morocco", "Africa").
is_in("Mozambique", "Africa").
is_in("Myanmar (Burma)", "Southeast Asia").
is_in("Namibia", "Africa").
is_in("Nauru", "Oceania").
is_in("Nepal", "Asia").
is_in("Netherlands", "Europe").
is_in("New Zealand", "Oceania").
is_in("Nicaragua", "Central America").
is_in("Niger", "Africa").
is_in("Nigeria", "Africa").
is_in("Norway", "Europe").
is_in("Oman", "Middle East").
is_in("Pakistan", "Asia").
is_in("Palau", "Oceania").
is_in("Panama", "Central America").
is_in("Papua New Guinea", "Oceania").
is_in("Paraguay", "South America").
is_in("Peru", "South America").
is_in("Philippines", "Southeast Asia").
is_in("Poland", "Europe").
is_in("Portugal", "Europe").
is_in("Qatar", "Middle East").
is_in("Romania", "Europe").
is_in("Russia", "Asia").
is_in("Rwanda", "Africa").
is_in("Saint Kitts and Nevis", "Caribbean").
is_in("Saint Lucia", "Caribbean").
is_in("Saint Vincent and the Grenadines", "Caribbean").
is_in("Samoa", "Oceania").
is_in("San Marino", "Europe").
is_in("São Tomé and Príncipe", "Africa").
is_in("Saudi Arabia", "Middle East").
is_in("Senegal", "Africa").
is_in("Serbia", "Europe").
is_in("Seychelles", "Africa").
is_in("Sierra Leone", "Africa").
is_in("Singapore", "Southeast Asia").
is_in("Slovakia", "Europe").
is_in("Slovenia", "Europe").
is_in("Solomon Islands", "Oceania").
is_in("Somalia", "Africa").
is_in("South Africa", "Africa").
is_in("South Sudan", "Africa").
is_in("Spain", "Europe").
is_in("Sri Lanka", "Asia").
is_in("Sudan", "Africa").
is_in("Suriname", "South America").
is_in("Swaziland", "Africa").
is_in("Sweden", "Europe").
is_in("Switzerland", "Europe").
is_in("Syria", "Middle East").
is_in("Taiwan", "Asia").
is_in("Tajikistan", "Asia").
is_in("Tanzania", "Africa").
is_in("Thailand", "Southeast Asia").
is_in("Togo", "Africa").
is_in("Tonga", "Oceania").
is_in("Trinidad and Tobago", "Caribbean").
is_in("Tunisia", "Africa").
is_in("Turkey", "Europe").
is_in("Turkmenistan", "Asia").
is_in("Tuvalu", "Oceania").
is_in("Uganda", "Africa").
is_in("Ukraine", "Europe").
is_in("United Arab Emirates", "Middle East").
is_in("United Kingdom", "Europe").
is_in("United States", "North America").
is_in("Uruguay", "South America").
is_in("Uzbekistan", "Asia").
is_in("Vanuatu", "Oceania").
is_in("Vatican City", "Europe").
is_in("Venezuela", "South America").
is_in("Vietnam", "Southeast Asia").
is_in("Yemen", "Middle East").
is_in("Zambia", "Africa").
is_in("Zimbabwe", "Africa").

sea("Adriatic Sea").
sea("Aegean Sea").
sea("Amundsen Sea").
sea("Andaman Sea").
sea("Arabian Sea").
sea("Arafura Sea").
sea("Aral Sea").
sea("Arctic Ocean").
sea("Atlantic Ocean").
sea("Baffin Bay").
sea("Baltic Sea").
sea("Banda Sea").
sea("Barents Sea").
sea("Bay of Bengal").
sea("Beaufort Sea").
sea("Bering Sea").
sea("Bismarck Sea").
sea("Black Sea").
sea("Caribbean Sea").
sea("Caspian Sea").
sea("Celebes Sea").
sea("Celtic Sea").
sea("Chukchi Sea").
sea("Coral Sea").
sea("East China Sea").
sea("East Siberian Sea").
sea("Flores Sea").
sea("Greenland Sea").
sea("Gulf of Guinea").
sea("Gulf of Mexico").
sea("Hudson Bay").
sea("Indian Ocean").
sea("Irish Sea").
sea("Java Sea").
sea("Kara Sea").
sea("Labrador Sea").
sea("Laptev Sea").
sea("Ligurian Sea").
sea("Mediterranean Sea").
sea("Molucca Sea").
sea("Mozambique Channel").
sea("North Sea").
sea("Norwegian Sea").
sea("Pacific Ocean").
sea("Persian Gulf").
sea("Red Sea").
sea("Ross Sea").
sea("Sea of Japan").
sea("Sea of Okhotsk").
sea("Solomon Sea").
sea("South China Sea").
sea("Southern Ocean").
sea("Sulu Sea").
sea("Tasman Sea").
sea("Timor Sea").
sea("Weddell Sea").
sea("Yellow Sea").

high_sea("Adriatic Sea").
high_sea("Aegean Sea").
high_sea("Amundsen Sea").
high_sea("Andaman Sea").
high_sea("Arabian Sea").
high_sea("Arafura Sea").
high_sea("Arctic Ocean").
high_sea("Atlantic Ocean").
high_sea("Baffin Bay").
high_sea("Baltic Sea").
high_sea("Banda Sea").
high_sea("Barents Sea").
high_sea("Bay of Bengal").
high_sea("Beaufort Sea").
high_sea("Bering Sea").
high_sea("Bismarck Sea").
high_sea("Black Sea").
high_sea("Caribbean Sea").
high_sea("Celebes Sea").
high_sea("Celtic Sea").
high_sea("Chukchi Sea").
high_sea("Coral Sea").
high_sea("East China Sea").
high_sea("East Siberian Sea").
high_sea("Flores Sea").
high_sea("Greenland Sea").
high_sea("Gulf of Guinea").
high_sea("Gulf of Mexico").
high_sea("Hudson Bay").
high_sea("Indian Ocean").
high_sea("Irish Sea").
high_sea("Java Sea").
high_sea("Kara Sea").
high_sea("Labrador Sea").
high_sea("Laptev Sea").
high_sea("Ligurian Sea").
high_sea("Mediterranean Sea").
high_sea("Molucca Sea").
high_sea("Mozambique Channel").
high_sea("North Sea").
high_sea("Norwegian Sea").
high_sea("Pacific Ocean").
high_sea("Persian Gulf").
high_sea("Red Sea").
high_sea("Ross Sea").
high_sea("Sea of Japan").
high_sea("Sea of Okhotsk").
high_sea("Solomon Sea").
high_sea("South China Sea").
high_sea("Southern Ocean").
high_sea("Sulu Sea").
high_sea("Tasman Sea").
high_sea("Timor Sea").
high_sea("Weddell Sea").
high_sea("Yellow Sea").

borders("Afghanistan", ["China", "Iran", "Pakistan", "Tajikistan", "Turkmenistan", "Uzbekistan"]).
borders("Albania", ["Greece", "Macedonia", "Montenegro", "Serbia", "Atlantic Ocean", "Adriatic Sea", "Ionian Sea"]).
borders("Algeria", ["Libya", "Mali", "Mauritania", "Morocco", "Niger", "Tunisia", "Western Sahara", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Andorra", ["France", "Spain"]).
borders("Angola", ["Congo, Democratic Republic of the", "Namibia", "Republic of the Congo", "Zambia", "Atlantic Ocean"]).
borders("Antigua and Barbuda", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Argentina", ["Bolivia", "Brazil", "Chile", "Paraguay", "Uruguay", "Atlantic Ocean", "Scotia Sea"]).
borders("Armenia", ["Azerbaijan", "Georgia", "Iran", "Turkey"]).
borders("Australia", ["Indian Ocean", "Pacific Ocean", "Arafura Sea", "Coral Sea", "Tasman Sea", "Timor Sea"]).
borders("Austria", ["Czech Republic", "Germany", "Hungary", "Italy", "Liechtenstein", "Slovakia", "Slovenia", "Switzerland"]).
borders("Azerbaijan", ["Europe", "Armenia", "Georgia", "Iran", "Russia", "Turkey", "Caspian Sea"]).
borders("Bahamas", ["Atlantic Ocean"]).
borders("Bahrain", ["Indian Ocean", "Persian Gulf"]).
borders("Bangladesh", ["India", "Myanmar (Burma)", "Indian Ocean"]).
borders("Barbados", ["Atlantic Ocean"]).
borders("Belarus", ["Latvia", "Lithuania", "Poland", "Russia", "Ukraine"]).
borders("Belgium", ["France", "Germany", "Luxembourg", "Netherlands", "Atlantic Ocean", "North Sea"]).
borders("Belize", ["Guatemala", "Mexico", "Atlantic Ocean", "Caribbean Sea"]).
borders("Benin", ["Burkina Faso", "Niger", "Nigeria", "Togo", "Atlantic Ocean", "Gulf of Guinea"]).
borders("Bhutan", ["China", "India"]).
borders("Bolivia", ["Argentina", "Brazil", "Chile", "Paraguay", "Peru"]).
borders("Bosnia and Herzegovina", ["Croatia", "Serbia", "Montenegro", "Atlantic Ocean", "Adriatic Sea"]).
borders("Botswana", ["Namibia", "South Africa", "Zambia", "Zimbabwe"]).
borders("Brazil", ["Argentina", "Bolivia", "Colombia", "France", "Guyana", "Paraguay", "Peru", "Suriname", "Uruguay", "Venezuela", "Atlantic Ocean"]).
borders("Brunei Darussalam", ["Malaysia", "Pacific Ocean", "South China Sea"]).
borders("Bulgaria", ["Greece", "Macedonia", "Romania", "Serbia", "Turkey", "Atlantic Ocean", "Black Sea"]).
borders("Burkina Faso", ["Benin", "Ivory Coast", "Ghana", "Mali", "Niger", "Togo"]).
borders("Burundi", ["Congo, Democratic Republic of the", "Rwanda", "Tanzania"]).
borders("Cambodia", ["Laos", "Thailand", "Vietnam", "Pacific Ocean"]).
borders("Cameroon", ["Central African Republic", "Chad", "Republic of the Congo", "Equatorial Guinea", "Gabon", "Nigeria", "Atlantic Ocean", "Gulf of Guinea"]).
borders("Canada", ["United States", "Arctic Ocean", "Atlantic Ocean", "Pacific Ocean", "Baffin Bay", "Beaufort Sea", "Hudson Bay", "Labrador Sea"]).
borders("Cape Verde", ["Atlantic Ocean"]).
borders("Central African Republic", ["Cameroon", "Chad", "Congo, Democratic Republic of the", "Republic of the Congo", "South Sudan", "Sudan"]).
borders("Chad", ["Cameroon", "Central African Republic", "Libya", "Niger", "Nigeria", "Sudan"]).
borders("Chile", ["Argentina", "Bolivia", "Peru", "Pacific Ocean"]).
borders("China", ["Afghanistan", "Bhutan", "Hong Kong", "India", "Kazakhstan", "Kyrgyzstan", "Laos", "Macau", "Mongolia", "Myanmar", "Nepal", "North Korea", "Pakistan", "Russia", "Tajikistan", "Vietnam", "Pacific Ocean", "East China Sea", "South China Sea", "Yellow Sea"]).
borders("Colombia", ["Brazil", "Ecuador", "Panama", "Peru", "Venezuela", "Pacific Ocean", "Atlantic Ocean", "Caribbean Sea"]).
borders("Comoros", ["Indian Ocean"]).
borders("Congo, Democratic Republic of the", ["Angola", "Burundi", "Central African Republic", "Republic of the Congo", "Rwanda", "South Sudan", "Tanzania", "Uganda", "Zambia", "Atlantic Ocean"]).
borders("Republic of the Congo", ["Angola", "Cameroon", "Central African Republic", "Congo, Democratic Republic of the", "Gabon", "Atlantic Ocean"]).
borders("Costa Rica", ["Nicaragua", "Panama", "Atlantic Ocean", "Pacific Ocean", "Caribbean Sea"]).
borders("Ivory Coast", ["Burkina Faso", "Ghana", "Guinea", "Liberia", "Mali", "Atlantic Ocean"]).
borders("Croatia", ["Bosnia and Herzegovina", "Hungary", "Serbia", "Montenegro", "Slovenia", "Atlantic Ocean", "Adriatic Sea"]).
borders("Cuba", ["Atlantic Ocean", "Caribbean Sea", "Gulf of Mexico"]).
borders("Cyprus", ["Akrotiri", "Dhekelia", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Czech Republic", ["Austria", "Germany", "Poland", "Slovakia"]).
borders("Denmark", ["Germany", "Atlantic Ocean", "Baltic Sea", "North Sea"]).
borders("Djibouti", ["Eritrea", "Ethiopia", "Somalia", "Indian Ocean", "Red Sea", "Gulf of Aden"]).
borders("Dominica", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Dominican Republic", ["Haiti", "Atlantic Ocean", "Caribbean Sea"]).
borders("East Timor", ["Indonesia", "Indian Ocean", "Timor Sea"]).
borders("Ecuador", ["Colombia", "Peru", "Pacific Ocean"]).
borders("Egypt", ["Middle East", "Israel", "Libya", "Sudan", "Atlantic Ocean", "Indian Ocean", "Mediterranean Sea", "Red Sea"]).
borders("El Salvador", ["Guatemala", "Honduras", "Pacific Ocean"]).
borders("Equatorial Guinea", ["Cameroon", "Gabon", "Atlantic Ocean", "Gulf of Guinea"]).
borders("Eritrea", ["Djibouti", "Ethiopia", "Sudan", "Indian Ocean", "Red Sea"]).
borders("Estonia", ["Latvia", "Russia", "Atlantic Ocean", "Baltic Sea", "Gulf of Finland"]).
borders("Ethiopia", ["Djibouti", "Eritrea", "Kenya", "Somalia", "South Sudan", "Sudan"]).
borders("Fiji", ["Pacific Ocean"]).
borders("Finland", ["Norway", "Russia", "Sweden", "Atlantic Ocean", "Baltic Sea", "Gulf of Finland"]).
borders("France", ["South America", "Andorra", "Belgium", "Brazil", "Germany", "Italy", "Luxembourg", "Monaco", "Spain", "Suriname", "Switzerland", "Atlantic Ocean", "Bay of Biscay", "English Channel", "Mediterranean Sea", "North Sea"]).
borders("Gabon", ["Cameroon", "Republic of the Congo", "Equatorial Guinea", "Atlantic Ocean", "Gulf of Guinea"]).
borders("The Gambia", ["Senegal", "Atlantic Ocean"]).
borders("Georgia", ["Europe", "Armenia", "Azerbaijan", "Russia", "Turkey", "Atlantic Ocean", "Black Sea"]).
borders("Germany", ["Austria", "Belgium", "Czech Republic", "Denmark", "France", "Luxembourg", "Netherlands", "Poland", "Switzerland", "Atlantic Ocean", "North Sea", "Baltic Sea"]).
borders("Ghana", ["Burkina Faso", "Ivory Coast", "Togo", "Atlantic Ocean", "Gulf of Guinea"]).
borders("Greece", ["Albania", "Bulgaria", "Macedonia", "Turkey", "Atlantic Ocean", "Aegean Sea", "Ionian Sea", "Mediterranean Sea"]).
borders("Grenada", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Guatemala", ["Belize", "El Salvador", "Honduras", "Mexico", "Atlantic Ocean", "Pacific Ocean", "Caribbean Sea"]).
borders("Guinea", ["Ivory Coast", "Guinea-Bissau", "Liberia", "Mali", "Senegal", "Sierra Leone", "Atlantic Ocean"]).
borders("Guinea-Bissau", ["Guinea", "Senegal", "Atlantic Ocean"]).
borders("Guyana", ["Brazil", "Suriname", "Venezuela", "Atlantic Ocean"]).
borders("Haiti", ["Dominican Republic", "Atlantic Ocean", "Caribbean Sea"]).
borders("Honduras", ["El Salvador", "Guatemala", "Nicaragua", "Atlantic Ocean", "Pacific Ocean", "Caribbean Sea"]).
borders("Hungary", ["Austria", "Croatia", "Romania", "Serbia", "Slovakia", "Slovenia", "Ukraine"]).
borders("Iceland", ["Atlantic Ocean", "Arctic Ocean"]).
borders("India", ["Bangladesh", "Bhutan", "China", "Myanmar", "Nepal", "Pakistan", "Indian Ocean", "Arabian Sea", "Bay of Bengal", "Andaman Sea", "Laccadive Sea", "Gulf of Mannar"]).
borders("Indonesia", ["East Timor", "Malaysia", "Papua New Guinea", "Indian Ocean", "Pacific Ocean", "Arafura Sea", "Banda Sea", "Celebes Sea", "Java Sea", "Molucca Sea", "Timor Sea"]).
borders("Iran", ["Afghanistan", "Armenia", "Azerbaijan", "Iraq", "Pakistan", "Turkey", "Turkmenistan", "Caspian Sea", "Indian Ocean", "Gulf of Oman", "Persian Gulf"]).
borders("Iraq", ["Iran", "Jordan", "Kuwait", "Saudi Arabia", "Syria", "Turkey", "Indian Ocean", "Persian Gulf"]).
borders("Ireland", ["United Kingdom", "Atlantic Ocean", "Irish Sea"]).
borders("Israel", ["Egypt", "Jordan", "Lebanon", "Syria", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Italy", ["Austria", "France", "San Marino", "Slovenia", "Switzerland", "Vatican City", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Jamaica", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Japan", ["Pacific Ocean", "East China Sea", "Sea of Japan", "Sea of Okhotsk"]).
borders("Jordan", ["Iraq", "Israel", "Saudi Arabia", "Syria", "Indian Ocean", "Gulf of Aqaba"]).
borders("Kazakhstan", ["Europe", "China", "Kyrgyzstan", "Russia", "Turkmenistan", "Uzbekistan", "Caspian Sea"]).
borders("Kenya", ["Ethiopia", "Somalia", "South Sudan", "Tanzania", "Uganda", "Indian Ocean"]).
borders("Kiribati", ["Pacific Ocean"]).
borders("Democratic People's Republic of Korea", ["China", "Republic of Korea", "Russia", "Pacific Ocean", "Korea Bay", "Sea of Japan", "Yellow Sea"]).
borders("Korea, South", ["Democratic People's Republic of Korea", "Pacific Ocean", "Sea of Japan", "Yellow Sea"]).
borders("Kuwait", ["Iraq", "Saudi Arabia", "Indian Ocean", "Persian Gulf"]).
borders("Kyrgyzstan", ["China", "Kazakhstan", "Tajikistan", "Uzbekistan"]).
borders("Laos", ["Cambodia", "China", "Myanmar", "Thailand", "Vietnam"]).
borders("Latvia", ["Belarus", "Estonia", "Lithuania", "Russia", "Atlantic Ocean", "Baltic Sea"]).
borders("Lebanon", ["Syria", "Israel", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Lesotho", ["South Africa"]).
borders("Liberia", ["Ivory Coast", "Guinea", "Sierra Leone", "Atlantic Ocean"]).
borders("Libya", ["Algeria", "Chad", "Egypt", "Niger", "Sudan", "Tunisia", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Liechtenstein", ["Austria", "Switzerland"]).
borders("Lithuania", ["Belarus", "Latvia", "Poland", "Russia", "Atlantic Ocean", "Baltic Sea"]).
borders("Luxembourg", ["Belgium", "France", "Germany"]).
borders("Macedonia", ["Albania", "Bulgaria", "Greece", "Serbia"]).
borders("Madagascar", ["Indian Ocean", "Mozambique Channel"]).
borders("Malawi", ["Mozambique", "Tanzania", "Zambia"]).
borders("Malaysia", ["Brunei", "Indonesia", "Singapore", "Thailand", "Indian Ocean", "Pacific Ocean", "South China Sea"]).
borders("Maldives", ["Indian Ocean"]).
borders("Mali", ["Algeria", "Burkina Faso", "Ivory Coast", "Guinea", "Mauritania", "Niger", "Senegal"]).
borders("Malta", ["Atlantic Ocean", "Mediterranean Sea"]).
borders("Marshall Islands", ["Pacific Ocean"]).
borders("Mauritania", ["Algeria", "Mali", "Senegal", "Western Sahara", "Atlantic Ocean"]).
borders("Mauritius", ["Indian Ocean"]).
borders("Mexico", ["Belize", "Guatemala", "United States", "Atlantic Ocean", "Pacific Ocean", "Gulf of Mexico", "Caribbean Sea"]).
borders("Federated States of Micronesia", ["Pacific Ocean"]).
borders("Moldova", ["Romania", "Ukraine"]).
borders("Monaco", ["France", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Mongolia", ["China", "Russia"]).
borders("Montenegro", ["Albania", "Bosnia Herzegovina", "Croatia", "Serbia", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Morocco", ["Algeria", "Spain", "Ceuta", "Melilla", "Peñón de Vélez de la Gomera", "Western Sahara", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Mozambique", ["Malawi", "South Africa", "Swaziland", "Tanzania", "Zambia", "Zimbabwe", "Indian Ocean"]).
borders("Myanmar (Burma)", ["Bangladesh", "China", "India", "Laos", "Thailand", "Indian Ocean", "Andaman Sea"]).
borders("Namibia", ["Angola", "Botswana", "South Africa", "Zambia", "Atlantic Ocean"]).
borders("Nauru", ["Pacific Ocean"]).
borders("Nepal", ["China", "India"]).
borders("Netherlands", ["Belgium", "Germany", "Atlantic Ocean", "North Sea"]).
borders("New Zealand", ["Pacific Ocean"]).
borders("Nicaragua", ["Costa Rica", "Honduras", "Atlantic Ocean", "Pacific Ocean", "Caribbean Sea"]).
borders("Niger", ["Algeria", "Benin", "Burkina Faso", "Chad", "Libya", "Mali", "Nigeria"]).
borders("Nigeria", ["Benin", "Cameroon", "Chad", "Niger", "Atlantic Ocean", "Gulf of Guinea"]).
borders("Norway", ["Finland", "Russia", "Sweden", "Arctic Ocean", "Atlantic Ocean"]).
borders("Oman", ["Saudi Arabia", "United Arab Emirates", "Yemen", "Indian Ocean"]).
borders("Pakistan", ["Afghanistan", "China", "India", "Iran", "Indian Ocean"]).
borders("Palau", ["Pacific Ocean"]).
borders("Panama", ["Colombia", "Costa Rica", "Atlantic Ocean", "Caribbean Sea", "Pacific Ocean"]).
borders("Papua New Guinea", ["Indonesia", "Pacific Ocean"]).
borders("Paraguay", ["Argentina", "Bolivia", "Brazil"]).
borders("Peru", ["Bolivia", "Brazil", "Chile", "Colombia", "Ecuador", "Pacific Ocean"]).
borders("Philippines", ["Pacific Ocean"]).
borders("Poland", ["Belarus", "Czech Republic", "Germany", "Lithuania", "Russia", "Slovakia", "Ukraine", "Atlantic Ocean", "Baltic Sea"]).
borders("Portugal", ["Spain", "Atlantic Ocean"]).
borders("Qatar", ["Saudi Arabia", "Indian Ocean", "Persian Gulf"]).
borders("Romania", ["Bulgaria", "Hungary", "Moldova", "Serbia", "Ukraine", "Atlantic Ocean", "Black Sea"]).
borders("Russia", ["Europe", "Azerbaijan", "Belarus", "China", "Estonia", "Finland", "Georgia", "Kazakhstan", "Latvia", "Lithuania", "Mongolia", "North Korea", "Norway", "Poland", "Ukraine", "Arctic Ocean", "Atlantic Ocean", "Baltic Sea", "Black Sea", "Caspian Sea", "Pacific Ocean"]).
borders("Rwanda", ["Burundi", "Congo, Democratic Republic of the", "Tanzania", "Uganda"]).
borders("Saint Kitts and Nevis", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Saint Lucia", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Saint Vincent and the Grenadines", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Samoa", ["Pacific Ocean"]).
borders("San Marino", ["Italy"]).
borders("São Tomé and Príncipe", ["Atlantic Ocean", "Gulf of Guinea"]).
borders("Saudi Arabia", ["Iraq", "Jordan", "Kuwait", "Oman", "Qatar", "United Arab Emirates", "Yemen", "Indian Ocean", "Red Sea", "Persian Gulf"]).
borders("Senegal", ["The Gambia", "Mali", "Mauritania", "Guinea", "Guinea Bissau", "Atlantic Ocean"]).
borders("Serbia", ["Albania", "Bosnia", "Bulgaria", "Croatia", "Hungary", "Macedonia", "Montenegro", "Romania"]).
borders("Seychelles", ["Indian Ocean"]).
borders("Sierra Leone", ["Guinea", "Liberia", "Atlantic Ocean"]).
borders("Singapore", ["Malaysia", "Pacific Ocean", "Indian Ocean", "South China Sea"]).
borders("Slovakia", ["Austria", "Czech Republic", "Hungary", "Poland", "Ukraine"]).
borders("Slovenia", ["Austria", "Croatia", "Hungary", "Italy", "Atlantic Ocean", "Adriatic Sea"]).
borders("Solomon Islands", ["Pacific Ocean"]).
borders("Somalia", ["Djibouti", "Ethiopia", "Kenya", "Indian Ocean", "Gulf of Aden"]).
borders("South Africa", ["Botswana", "Lesotho", "Mozambique", "Namibia", "Swaziland", "Zimbabwe", "Atlantic Ocean", "Indian Ocean"]).
borders("South Sudan", ["Central African Republic", "Congo, Democratic Republic of the", "Ethiopia", "Kenya", "Sudan", "Uganda"]).
borders("Spain", ["Africa", "Andorra", "France", "Morocco", "Portugal", "United Kingdom (Gibraltar)", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Sri Lanka", ["Indian Ocean"]).
borders("Sudan", ["Central African Republic", "Chad", "Egypt", "Eritrea", "Ethiopia", "Libya", "South Sudan", "Indian Ocean", "Red Sea"]).
borders("Suriname", ["Brazil", "France", "Guyana", "Atlantic Ocean"]).
borders("Swaziland", ["Mozambique", "South Africa"]).
borders("Sweden", ["Finland", "Norway", "Atlantic Ocean", "Baltic Sea"]).
borders("Switzerland", ["Austria", "France", "Germany", "Italy", "Liechtenstein"]).
borders("Syria", ["Iraq", "Israel", "Jordan", "Lebanon", "Turkey", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Taiwan", ["Pacific Ocean", "East China Sea", "South China Sea"]).
borders("Tajikistan", ["Afghanistan", "China", "Kyrgyzstan", "Uzbekistan"]).
borders("Tanzania", ["Burundi", "Congo, Democratic Republic of the", "Kenya", "Malawi", "Mozambique", "Rwanda", "Uganda", "Zambia", "Indian Ocean"]).
borders("Thailand", ["Cambodia", "Laos", "Malaysia", "Myanmar", "Indian Ocean", "Pacific Ocean", "South China Sea"]).
borders("Togo", ["Benin", "Burkina Faso", "Ghana", "Atlantic Ocean", "Gulf of Guinea"]).
borders("Tonga", ["Pacific Ocean"]).
borders("Trinidad and Tobago", ["Atlantic Ocean", "Caribbean Sea"]).
borders("Tunisia", ["Algeria", "Libya", "Atlantic Ocean", "Mediterranean Sea"]).
borders("Turkey", ["Armenia", "Azerbaijan", "Bulgaria", "Georgia", "Greece", "Iran", "Iraq", "Syria", "Atlantic Ocean", "Mediterranean Sea", "Aegean Sea", "Marmara Sea", "Black Sea"]).
borders("Turkmenistan", ["Afghanistan", "Iran", "Kazakhstan", "Uzbekistan", "Caspian Sea"]).
borders("Tuvalu", ["Pacific Ocean"]).
borders("Uganda", ["Congo, Democratic Republic of the", "Kenya", "Rwanda", "South Sudan", "Tanzania"]).
borders("Ukraine", ["Belarus", "Hungary", "Moldova", "Poland", "Romania", "Russia", "Slovakia", "Atlantic Ocean", "Black Sea"]).
borders("United Arab Emirates", ["Oman", "Saudi Arabia", "Indian Ocean", "Persian Gulf"]).
borders("United Kingdom", ["Ireland", "Atlantic Ocean"]).
borders("United States", ["Canada", "Mexico", "Arctic Ocean", "Atlantic Ocean", "Pacific Ocean", "Gulf of Mexico"]).
borders("Uruguay", ["Argentina", "Brazil", "Atlantic Ocean"]).
borders("Uzbekistan", ["Afghanistan", "Kazakhstan", "Kyrgyzstan", "Tajikistan", "Turkmenistan"]).
borders("Vanuatu", ["Pacific Ocean"]).
borders("Vatican City", ["Italy"]).
borders("Venezuela", ["Brazil", "Colombia", "Guyana", "Atlantic Ocean", "Caribbean Sea"]).
borders("Vietnam", ["Cambodia", "China", "Laos", "Pacific Ocean", "South China Sea"]).
borders("Yemen", ["Oman", "Saudi Arabia", "Indian Ocean", "Arabian Sea", "Gulf of Aden", "Red Sea"]).
borders("Zambia", ["Angola", "Botswana", "Congo, Democratic Republic of the", "Malawi", "Mozambique", "Namibia", "Tanzania", "Zimbabwe"]).
borders("Zimbabwe", ["Botswana", "Mozambique", "South Africa", "Zambia"]).

is_island(Country) :- country(Country), borders(Country, Nbors), forall(member(N, Nbors), sea(N)).
is_landlocked(Country) :- country(Country), borders(Country, Nbors), forall(member(N, Nbors), not(sea(N))).
is_doubly_landlocked(Country) :-
	country(Country),
	is_landlocked(Country),
	borders(Country, Nbors),
	forall(member(N, Nbors), is_landlocked(N)).

is_technically_landlocked(Country) :- country(Country), borders(Country, Nbors), forall(member(N, Nbors), not(high_sea(N))).
is_technically_doubly_landlocked(Country) :- country(Country), is_technically_landlocked(Country), borders(Country, Nbors), forall(member(N, Nbors), is_technically_landlocked(N)).

is_enclaved(Country) :- country(Country), borders(Country, [N]), country(N).
is_semi_enclaved(Country) :- is_landlocked(Country), borders(Country, [N1, N2]), borders(N1, Nbors1), borders(N2, Nbors2), member(N1, Nbors2), member(N2, Nbors1).
