perm filename BNCH10.PL[PLC,LSP]1 blob sn#763179 filedate 1984-08-03 generic text, type T, neo UTF8
% [16] **** Database Manipulations ****
%		This database is created by J. A. Robinson et al.

/*
If numerical values cannot be represented in your system,
chang the format.  For example, DEC-10 Prolog cannot
express more than 2↑18 or floating numbers.
*/

% population(afghanistan,20900000). ===> 161 clauses.
% adjoins(canada,usa). ===> 313 clauses.
% open←water(atlantic←ocean). ===> 40 clauses.
% country(moscow,ussr). ===>220 clauses.
% region(canada,north←america). ===> 162 clauses.
% produces(ussr,oil,491,1975). ===> 252 clauses.
% belongs(canada,nato). ===> 177 clauses.

:- public population/2, adjoins/2, open←water/2, country/2.
:- public region/2, produces/2, belongs/2.
:- public iscountry/1, landlocked/1, bordres/1.
:- public border←sea/2, oil←production/2.
:- public db2/1, db3/1, db4/1, db5/1.
:- public db6/1, db7/1, db8/1, db9/1, db10/1.
:- public q161/1, q162/1, q163/1, q164/1, q165/1.
:- public q166/1, q167/1, q168/1, q169/1, q160/1.

/*
To optimize the compiled code, add the next declarations:

:- mode size(+,+).
:- mode db2(-), db3(-), db4(-), db5(-), db6(-).
:- mode db7(-), db8(-), db9(-), db10(-).
:- mode q161(-), q162(-), q163(-), q164(-), q165(-).
:- mode q166(-), q167(-), q168(-), q169(-), q160(-).
:- fastcode.
:- compactcode.
*/

db2(S) :- setof(C, country(C,japan), S).

db3(C) :- region(C,far←east), iscountry(C), landlocked(C).

db4(S) :- setof(C, db3(C), S).

db5(C) :- iscountry(C), setof(X, border←sea(C,X), S), size(S,2).

border←sea(C,X) :- borders(C,X), open←water(X).
size([←,←],2).

db6(T) :- setof(C, db5(C),T).

db7(C) :-
       population(india,Y), borders(C,mediterranean←sea), iscountry(C),
       borders(C,C1), iscountry(C1), borders(C1,C2),
       population(C2,X), X>Y.

db8(S) :- setof(C, db7(C), S).

db9(S) :- setof([C,P], oil←production(C,P), S).
oil←production(C,P) :- 
  belongs(C,opec), \+belongs(C,arab←league), produces(C,oil,P,1975).

db10(X) :-
  open←water(X), borders(X,C), region(C,africa), iscountry(C),
  borders(X,C1), region(C1,europe), iscountry(C1).

/*
[16-1:] Which country's capital is Tokyo?
	do "q161(1000)." for one thousand iterations.
*/

q161(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q161(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q161(N,N) :- !.
loop←q161(I,N) :-
     I1 is I+1, country(tokyo,X), !, loop←q161(I1,N).

loop←dummy(N,N) :- !.
loop←dummy(I,N) :-
     I1 is I+1, !, loop←dummy(I1,N).

/*
[16-2:] What are the cities in Japan?
	do "q162(100)." for one hundred iterations.
*/

q162(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q162(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q162(N,N) :- !.
loop←q162(I,N) :-
     I1 is I+1, db2(C), !, loop←q162(I1,N).

/*
[16-3:] Which far-east countres is landlocked?
	do "q163(1)." for only once.
*/

q163(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q163(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q163(N,N) :- !.
loop←q163(I,N) :-
     I1 is I+1, db3(C), !, loop←q163(I1,N).

/*
[16-4:] List up all the far-east countres which are landlocked.
	do "q164(1)." for only once.
*/

q164(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q164(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q164(N,N) :- !.
loop←q164(I,N) :-
     I1 is I+1, db4(C), !, loop←q164(I1,N).

/*
[16-5:] Which countries border two seas?
	do "q165(1)." for only once.
*/

q165(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q165(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q165(N,N) :- !.
loop←q165(I,N) :-
     I1 is I+1, db5(C), !, loop←q165(I1,N).

/*
[16-6:] List up all the countries which border two seas.
	do "q166(1)." for only once.
*/

q166(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q166(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q166(N,N) :- !.
loop←q166(I,N) :-
     I1 is I+1, db6(C), !, loop←q166(I1,N).

/*
[16-7:] Which country bordering the Mediterranean borders a country 
that is bordered by a country whose population exceeds the population 
of the United State?
	do "q167(1)." for only once.
*/

q167(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q167(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q167(N,N) :- !.
loop←q167(I,N) :-
     I1 is I+1, db7(C), !, loop←q167(I1,N).

/*
[16-8:] List up all the countries which hold 16-7.
	do "q168(1)." for only once.
*/

q168(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q168(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q168(N,N) :- !.
loop←q168(I,N) :-
     I1 is I+1, db8(C), !, loop←q168(I1,N).

/*
[16-9:] What are the oil production figures for the non-Arab OPEC
countries in the year 1975?
	do "q169(10)." for ten iterations.
*/

q169(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q169(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q169(N,N) :- !.
loop←q169(I,N) :-
     I1 is I+1, db9(C), !, loop←q169(I1,N).

/*
[16-10:] Which is the ocean that borders African countries and that
borders European countries?
	do "q160(10)." for ten iterations.
*/

q160(N) :- 
     statistics(garbage←collection,[←,←|G1]),!,
     statistics(runtime,[←,←]),!,
     loop←q160(0,N),
     statistics(runtime,[←,T1]),!,
     statistics(garbage←collection,[←,←|G2]),!,
     statistics(runtime,[←,←]),!,
     loop←dummy(0,N),
     statistics(runtime,[←,T2]),
     statistics(garbage←collection,[←,←|G3]),!,
     G1 = [Gt1], G2 = [Gt2], G3 = [Gt3],
     G4 is Gt2 + Gt2 - Gt1 - Gt3,
     T3 is T1-T2-G4, Total is T1-T2,
     write('Total = '), write(Total),
     write('ms,  runtime = '), write(T3),
     write('ms,  gctime = '), write(G4),
     write('ms,   for '), write(N), write(' iterations.'), nl.

loop←q160(N,N) :- !.
loop←q160(I,N) :-
     I1 is I+1, db10(C), !, loop←q160(I1,N).


% ******** Definition of Places database ********

open←water(atlantic←ocean).
open←water(pacific←ocean).
open←water(caribbea←sea).
open←water(gulf←of←mexico).
open←water(straits←of←magellan).
open←water(straits←of←gibraltar).
open←water(mediterranean←sea).
open←water(arctic←ocean).
open←water(india←ocean).
open←water(arabia←sea).
open←water(gulf←of←aden).
open←water(red←sea).
open←water(panama←canal).
open←water(persia←gulf).
open←water(gulf←of←oman).
open←water(bering←sea).
open←water(english←channel).
open←water(north←sea).
open←water(baltic←sea).
open←water(black←sea).
open←water(bay←of←bengal).
open←water(yellow←sea).
open←water(formosa←strait).
open←water(south←china←sea).
open←water(philippine←sea).
open←water(gulf←of←siam).
open←water(sea←of←japan).
open←water(korea←strait).
open←water(suez←canal).
open←water(straits←of←hormuz).
open←water(gulf←of←suez).
open←water(taiwa←straits).
open←water(bab←el←mandeb).
open←water(bosporus).
open←water(dardanelles).
open←water(aegea←sea).
open←water(sea←of←marmara).
open←water(skagerrak).
open←water(kattegat).
open←water(gulf←of←bothnia).

population(afghanistan,2090).
population(albania,269).
population(algeria,1850).
population(andorra,2).
population(angola,676).
population(argentina,2640).
population(australia,1422).
population(austria,750).
population(bahamas,23).
population(bahrain,28).
population(bangladesh,8250).
population(barbados,26).
population(belgium,984).
population(benin,338).
population(bhutan,123).
population(bolivia,611).
population(botswana,72).
population(brazil,11545).
population(bulgaria,884).
population(burma,3220).
population(burundi,410).
population(cambodia,889).
population(cameroon,682).
population(canada,2344).
population(cape←verde,31).
population(central←africa←empire,200).
population(chad,429).
population(chile,1088).
population(china,88000).
population(taiwan,1667).
population(colombia,2580).
population(comoro←islands,37).
population(congo,150).
population(costa←rica,212).
population(cuba,959).
population(cyprus,70).
population(czechoslovakia,1515).
population(denmark,511).
population(djibouti,22).
population(dominica←republic,517).
population(ecuador,782).
population(egypt,3950).
population(el←salvador,434).
population(ethiopia,2970).
population(greenland,5).
population(fiji,62).
population(finland,475).
population(france,5325).
population(gabon,54).
population(gambia,56).
population(east←germany,1657).
population(west←germany,6125).
population(ghana,1065).
population(greece,930).
population(grenada,11).
population(guatemala,663).
population(guinea,477).
population(guinea←bissau,54).
population(guyana,82).
population(haiti,483).
population(honduras,290).
population(hungary,1070).
population(iceland,22).
population(india,64300).
population(indonesia,14700).
population(iran,3420).
population(iraq,1235).
population(ireland,324).
population(italy,5667).
population(ivory←coast,671).
population(jamaica,211).
population(japan,11485).
population(jordan,208).
population(kenya,1480).
population(north←korea,1700).
population(south←korea,3700).
population(kuwait,119).
population(laos,354).
population(lebanon,316).
population(lesotho,109).
population(liberia,185).
population(libya,260).
population(liechtenstein,2).
population(luxembourg,37).
population(madagascar,877).
population(malawi,553).
population(malaysia,1295).
population(maldives,14).
population(mali,615).
population(malta,33).
population(mauritania,140).
population(mauritius,89).
population(mexico,6695).
population(monaco,3).
population(mongolia,157).
population(morocco,1867).
population(mozambique,995).
population(nauru,1).
population(nepal,1342).
population(netherlands,1393).
population(new←zealand,313).
population(nicaragua,239).
population(niger,500).
population(nigeria,6665).
population(norway,405).
population(oman,85).
population(pakistan,7750).
population(panama,182).
population(papua←new←guinea,298).
population(paraguay,287).
population(peru,1700).
population(philippines,4640).
population(poland,3505).
population(portugal,1000).
population(qatar,20).
population(zimbabwe←rhodesia,695).
population(romania,2163).
population(rwanda,460).
population(sa←marino,2).
population(sao←tome←and←principe,8).
population(saudi←arabia,980).
population(senegal,509).
population(seychelles,6).
population(sierra←leone,347).
population(singapore,234).
population(solomo←islands,20).
population(somalia,344).
population(south←africa,2676).
population(spain,3673).
population(sri←lanka,1420).
population(sudan,1655).
population(surinam,46).
population(swaziland,52).
population(sweden,830).
population(switzerland,631).
population(syria,800).
population(tanzania,1).
population(thailand,4538).
population(togo,241).
population(tonga,10).
population(trinidad←and←tobago,112).
population(tunisia,640).
population(turkey,4312).
population(uganda,1277).
population(ussr,26075).
population(united←arab←emirates,65).
population(uk,5580).
population(england←and←wales,4912).
population(scotland,519).
population(northern←ireland,153).
population(usa,21852).
population(upper←volta,648).
population(uruguay,282).
population(venezuela,1315).
population(vietnam,4927).
population(yeme←arab←republic,730).
population(yemen,185).
population(yugoslavia,2190).
population(zaire,2715).
population(zambia,550).
population(israel,370).

iscountry(X):-country(Y,X).

landlocked(X):- iscountry(X), \+(landlocked←test(X)).
landlocked←test(X):-borders(X,Z),open←water(Z).

country(moscow,ussr).
country(novaya←zemlya,ussr).
country(sverdlovsk,ussr).
country(vladivostok,ussr).
country(gorki,ussr).
country(novosibirsk,ussr).
country(syracuse,usa).
country(new←york←city,usa).
country(ithaca,usa).
country(albany,usa).
country(sa←francisco,usa).
country(sa←diego,usa).
country(washington,usa).
country(boston,usa).
country(rome←ny,usa).
country(rome,italy).
country(paris,france).
country(london,uk).
country(dublin,ireland).
country(stockholm,sweden).
country(copenhagen,denmark).
country(amsterdam,netherlands).
country(brussels,belgium).
country(madrid,spain).
country(athens,greece).
country(ankara,turkey).
country(istanbul,turkey).
country(tirane,albania).
country(sofia,bulgaria).
country(belgrade,yugoslavia).
country(warsaw,poland).
country(prague,czechoslovakia).
country(lisbon,portugal).
country(tehran,iran).
country(delhi,india).
country(islamabad,pakistan).
country(tokyo,japan).
country(brisbane,australia).
country(canberra,australia).
country(wellington,new←zealand).
country(djakarta,indonesia).
country(singapore,singapore).
country(peking,china).
country(hanoi,vietnam).
country(seoul,south←korea).
country(pyong←yang,north←korea).
country(recife,brazil).
country(brasilia,brazil).
country(santiago,chile).
country(oslo,norway).
country(vancouver,canada).
country(ottawa,canada).
country(montreal,canada).
country(toronto,canada).
country(havana,cuba).
country(rio←de←janeiro,brazil).
country(sa←paolo,brazil).
country(buenos←aires,argentina).
country(tierra←del←fuego,argentina).
country(punta←arenas,chile).
country(caracas,venezuela).
country(sa←juan,usa).
country(tampa,usa).
country(rangoon,burma).
country(bonn,west←germany).
country(frankfurt,east←germany).
country(rotterdam,netherlands).
country(tashkent,ussr).
country(pretoria,south←africa).
country(bucharest,romania).
country(budapest,hungary).
country(vienna,austria).
country(bern,switzerland).
country(geneva,switzerland).
country(zurich,switzerland).
country(bangkok,thailand).
country(seattle,usa).
country(tahiti,unknown).
country(saigon,vietnam).
country(yokohama,japan).
country(pnom←penh,cambodia).
country(panama←canal,panama).
country(naples,italy).
country(honolulu,usa).
country(berlin,east←germany).
country(helsinki,finland).
country(reykjavik,iceland).
country(thule,greenland).
country(godthab,greenland).
country(kabul,afghanistan).
country(wigan,uk).
country(damascus,syria).
country(jerusalem,israel).
country(beirut,lebanon).
country(amman,jordan).
country(kuala←lumpur,malaysia).
country(lima,peru).
country(quito,ecuador).
country(la←paz,bolivia).
country(asuncion,paraguay).
country(montevideo,uruguay).
country(suez←canal,egypt).
country(cairo,egypt).
country(tripoli,libya).
country(tunis,tunisia).
country(algiers,algeria).
country(rabat,morocco).
country(nicosia,cyprus).
country(riyadh,saudi←arabia).
country(baghdad,iraq).
country(manila,philippines).
country(taipei,taiwan).
country(vientiane,laos).
country(shanghai,china).
country(chunking,china).
country(canton,china).
country(mukden,china).
country(bombay,india).
country(madras,india).
country(calcutta,india).
country(dacca,bangladesh).
country(kuwait,kuwait).
country(doha,qatar).
country(samarkand,ussr).
country(addisababa,ethiopia).
country(mogadiscio,somalia).
country(kampala,uganda).
country(khartoum,sudan).
country(sana,yeme←arab←republic).
country(nairobi,kenya).
country(tananarive,madagascar).
country(durban,south←africa).
country(cape←town,south←africa).
country(windhoek,namibia).
country(luanda,angola).
country(kinshasa,zaire).
country(brazzaville,congo).
country(usambura,burundi).
country(kigali,rwanda).
country(libreville,gabon).
country(yaounde,cameroon).
country(fort←lamy,chad).
country(bangui,central←africa←empire).
country(lagos,nigeria).
country(porto←novo,benin).
country(lome,togo).
country(accra,ghana).
country(ouagadougou,upper←volta).
country(niamey,niger).
country(bamako,mali).
country(monrovia,liberia).
country(freetown,sierra←leone).
country(conakry,guinea).
country(bathurst,gambia).
country(dakar,senegal).
country(nouakchott,mauritania).
country(salisbury,zimbabwe←rhodesia).
country(lourenco←marques,mozambique).
country(darwin,australia).
country(lusaka,zambia).
country(timbuktu,mali).
country(mexico←city,mexico).
country(guatemala←city,guatemala).
country(tegucigalpa,honduras).
country(managua,nicaragua).
country(guantanamo,cuba).
country(kingston,jamaica).
country(port←au←prince,haiti).
country(santo←domingo,dominica←republic).
country(sa←jose,costa←rica).
country(panama←city,panama).
country(sa←salvador,el←salvador).
country(greenwich,uk).
country(omaha,usa).
country(denver,usa).
country(nassau,bahamas).
country(manama,bahrain).
country(bridgetown,barbados).
country(thimphu,bhutan).
country(gaborone,botswana).
country(bujumbura,burundi).
country(praia,cape←verde).
country(bogota,colombia).
country(moroni,comoro←islands).
country(djibouti,djibouti).
country(suva,fiji).
country(saint←georges,grenada).
country(bissau,guinea←bissau).
country(georgetown,guyana).
country(abidjan,ivory←coast).
country(maseru,lesotho).
country(vaduz,liechtenstein).
country(luxembourg,luxembourg).
country(blantyre,malawi).
country(male,maldives).
country(valetta,malta).
country(port←louis,mauritius).
country(monte←carlo,monaco).
country(ula←bator,mongolia).
country(yaren,nauru).
country(katmandu,nepal).
country(muscat,oman).
country(port←moresby,papua←new←guinea).
country(sa←marino,sa←marino).
country(sao←tome,sao←tome←and←principe).
country(victoria,seychelles).
country(honiara,solomo←islands).
country(colombo,sri←lanka).
country(paramaribo,surinam).
country(mbabane,swaziland).
country(dar←es←salaam,tanzania).
country(nuku←alofa,tonga).
country(port←of←spain,trinidad←and←tobago).
country(abu←dhabi,united←arab←emirates).
country(apia,western←samoa).
country(aden,yemen).
country(andorra←la←vella,andorra).
country(cayenne,french←guiana).
country(gangtok,sikkim).
country(pisa,italy).

region(canada,north←america).
region(mexico,north←america).
region(usa,north←america).
region(argentina,south←america).
region(bolivia,south←america).
region(brazil,south←america).
region(chile,south←america).
region(colombia,south←america).
region(ecuador,south←america).
region(guyana,south←america).
region(paraguay,south←america).
region(peru,south←america).
region(surinam,south←america).
region(uruguay,south←america).
region(venezuela,south←america).
region(costa←rica,central←america).
region(el←salvador,central←america).
region(guatemala,central←america).
region(honduras,central←america).
region(nicaragua,central←america).
region(panama,central←america).
region(bahamas,caribbean).
region(barbados,caribbean).
region(cuba,caribbean).
region(dominica←republic,caribbean).
region(grenada,caribbean).
region(haiti,caribbean).
region(jamaica,caribbean).
region(trinidad←and←tobago,caribbean).
region(albania,europe).
region(andorra,europe).
region(austria,europe).
region(belgium,europe).
region(bulgaria,europe).
region(cyprus,europe).
region(czechoslovakia,europe).
region(denmark,europe).
region(finland,europe).
region(france,europe).
region(east←germany,europe).
region(west←germany,europe).
region(greece,europe).
region(hungary,europe).
region(iceland,europe).
region(ireland,europe).
region(italy,europe).
region(liechtenstein,europe).
region(luxembourg,europe).
region(malta,europe).
region(monaco,europe).
region(netherlands,europe).
region(norway,europe).
region(poland,europe).
region(portugal,europe).
region(romania,europe).
region(sa←marino,europe).
region(spain,europe).
region(sweden,europe).
region(switzerland,europe).
region(ussr,europe).
region(uk,europe).
region(yugoslavia,europe).
region(bahrain,middle←east).
region(iran,middle←east).
region(iraq,middle←east).
region(israel,middle←east).
region(jordan,middle←east).
region(kuwait,middle←east).
region(lebanon,middle←east).
region(oman,middle←east).
region(qatar,middle←east).
region(saudi←arabia,middle←east).
region(syria,middle←east).
region(turkey,middle←east).
region(united←arab←emirates,middle←east).
region(yemen,middle←east).
region(yeme←arab←republic,middle←east).
region(china,far←east).
region(taiwan,far←east).
region(japan,far←east).
region(north←korea,far←east).
region(south←korea,far←east).
region(mongolia,far←east).
region(philippines,far←east).
region(cambodia,south←east←asia).
region(indonesia,south←east←asia).
region(laos,south←east←asia).
region(malaysia,south←east←asia).
region(singapore,south←east←asia).
region(thailand,south←east←asia).
region(vietnam,south←east←asia).
region(afghanistan,south←asia).
region(bangladesh,south←asia).
region(bhutan,south←asia).
region(burma,south←asia).
region(india,south←asia).
region(maldives,south←asia).
region(nepal,south←asia).
region(pakistan,south←asia).
region(sri←lanka,south←asia).
region(australia,oceania).
region(fiji,oceania).
region(nauru,oceania).
region(new←zealand,oceania).
region(papua←new←guinea,oceania).
region(solomo←islands,oceania).
region(tonga,oceania).
region(western←samoa,oceania).
region(algeria,africa).
region(angola,africa).
region(benin,africa).
region(botswana,africa).
region(burundi,africa).
region(cameroon,africa).
region(cape←verde,africa).
region(gabon,africa).
region(libya,africa).
region(nigeria,africa).
region(central←africa←empire,africa).
region(chad,africa).
region(comoro←islands,africa).
region(congo,africa).
region(djibouti,africa).
region(egypt,africa).
region(ethiopia,africa).
region(gambia,africa).
region(ghana,africa).
region(guinea,africa).
region(guinea←bissau,africa).
region(ivory←coast,africa).
region(kenya,africa).
region(lesotho,africa).
region(liberia,africa).
region(madagascar,africa).
region(malawi,africa).
region(mali,africa).
region(mauritania,africa).
region(mauritius,africa).
region(morocco,africa).
region(mozambique,africa).
region(namibia,africa).
region(niger,africa).
region(zimbabwe←rhodesia,africa).
region(rwanda,africa).
region(sao←tome←and←principe,africa).
region(senegal,africa).
region(seychelles,africa).
region(sierra,leone,africa).
region(somalia,africa).
region(south←africa,africa).
region(sudan,africa).
region(swaziland,africa).
region(tanzania,africa).
region(togo,africa).
region(tunisia,africa).
region(uganda,africa).
region(upper←volta,africa).
region(zaire,africa).
region(zambia,africa).
region(spanish←sahara,africa).
region(french←guiana,south←america).
region(sikkim,south←asia).

produces(ussr,oil,491,1975).
produces(ussr,oil,353,1970).
produces(usa,oil,41399,1975).
produces(usa,oil,475,1970).
produces(saudi←arabia,oil,352,1975).
produces(saudi←arabia,oil,188,1970).
produces(united←arab←emirates,oil,80,1975).
produces(united←arab←emirates,oil,37,1970).
produces(nigeria,oil,88,1975).
produces(nigeria,oil,54,1970).
produces(mexico,oil,36,1975).
produces(mexico,oil,21,1970).
produces(libya,oil,71,1975).
produces(libya,oil,159,1970).
produces(kuwait,oil,105,1975).
produces(kuwait,oil,150,1970).
produces(iraq,oil,111,1975).
produces(iran,oil,191,1970).
produces(iraq,oil,76,1970).
produces(iran,oil,267,1975).
produces(indonesia,oil,64,1975).
produces(indonesia,oil,42,1970).
produces(venezuela,oil,122,1975).
produces(venezuela,oil,194,1970).
produces(usa,wheat,58999,1975).
produces(usa,rice,5,1975).
produces(ussr,wheat,66,1975).
produces(ussr,rice,2,1975).
produces(algeria,oil,45999,1975).
produces(algeria,oil,47,1970).
produces(argentina,oil,20,1975).
produces(argentina,oil,20,1970).
produces(australia,oil,20,1975).
produces(australia,oil,8,1970).
produces(austria,oil,2,1975).
produces(austria,oil,2,1970).
produces(bahrain,oil,39999,1975).
produces(bahrain,oil,3,1970).
produces(brazil,oil,8,1975).
produces(brazil,oil,8,1970).
produces(bulgaria,oil,0,1975).
produces(bulgaria,oil,1,1970).
produces(canada,oil,67,1975).
produces(canada,oil,60,1970).
produces(chile,oil,1,1975).
produces(chile,oil,1,1970).
produces(china,oil,24,1975).
produces(china,oil,20999,1970).
produces(taiwan,oil,0,1975).
produces(taiwan,oil,1,1970).
produces(colombia,oil,8,1975).
produces(colombia,oil,11,1970).
produces(cuba,oil,0,1975).
produces(cuba,oil,0,1970).
produces(ecuador,oil,8,1975).
produces(ecuador,oil,0,1970).
produces(egypt,oil,8,1975).
produces(egypt,oil,16,1970).
produces(france,oil,1,1975).
produces(france,oil,2,1970).
produces(east←germany,oil,1,1975).
produces(west←germany,oil,5,1975).
produces(east←germany,oil,1,1970).
produces(west←germany,oil,7,1970).
produces(hungary,oil,2,1975).
produces(hungary,oil,1,1970).
produces(india,oil,8,1975).
produces(india,oil,6,1970).
produces(israel,oil,4,1975).
produces(israel,oil,4,1970).
produces(italy,oil,1,1975).
produces(italy,oil,1,1970).
produces(japan,oil,0,1975).
produces(japan,oil,1,1970).
produces(malaysia,oil,4,1975).
produces(malaysia,oil,1,1970).
produces(netherlands,oil,1,1975).
produces(netherlands,oil,2,1970).
produces(new←zealand,oil,1,1975).
produces(new←zealand,oil,1,1970).
produces(norway,oil,9,1975).
produces(pakistan,oil,1,1975).
produces(pakistan,oil,1,1970).
produces(peru,oil,4,1975).
produces(peru,oil,4,1970).
produces(poland,oil,1,1975).
produces(poland,oil,0,1970).
produces(romania,oil,14,1975).
produces(romania,oil,13,1970).
produces(spain,oil,2,1975).
produces(spain,oil,0,1970).
produces(syria,oil,10,1975).
produces(syria,oil,4,1970).
produces(tunisia,oil,5,1975).
produces(tunisia,oil,4,1970).
produces(turkey,oil,39999,1975).
produces(turkey,oil,3,1970).
produces(uk,oil,1,1975).
produces(uk,oil,1,1970).
produces(yugoslavia,oil,4,1975).
produces(yugoslavia,oil,3,1970).
produces(zaire,oil,1,1975).
produces(afghanistan,wheat,3,1975).
produces(argentina,wheat,9,1975).
produces(australia,wheat,12,1975).
produces(austria,wheat,1,1975).
produces(bangladesh,wheat,0,1975).
produces(belgium,wheat,1,1975).
produces(brazil,wheat,2,1975).
produces(bulgaria,wheat,3,1975).
produces(canada,wheat,17780,1975).
produces(chile,wheat,10200,1975).
produces(china,wheat,41029,1975).
produces(taiwan,wheat,0,1975).
produces(colombia,wheat,0,1975).
produces(czechoslovakia,wheat,4,1975).
produces(denmark,wheat,0,1975).
produces(ecuador,0,1975).
produces(egypt,wheat,23299,1975).
produces(ethiopia,wheat,1,1975).
produces(finland,wheat,1,1975).
produces(france,wheat,15410,1975).
produces(east←germany,wheat,2,1975).
produces(west←germany,wheat,71399,1975).
produces(greece,wheat,2,1975).
produces(hungary,wheat,40700,1975).
produces(india,wheat,24,1975).
produces(iran,wheat,5,1975).
produces(iraq,wheat,1,1975).
produces(ireland,wheat,0,1975).
produces(israel,wheat,0,1975).
produces(italy,wheat,10,1975).
produces(japan,wheat,0,1975).
produces(north←korea,wheat,0,1975).
produces(south←korea,wheat,0,1975).
produces(mexico,wheat,3,1975).
produces(nepal,wheat,0,1975).
produces(netherlands,wheat,0,1975).
produces(new←zealand,wheat,0,1975).
produces(pakistan,wheat,7,1975).
produces(peru,wheat,0,1975).
produces(poland,wheat,5,1975).
produces(portugal,wheat,0,1975).
produces(romania,wheat,4,1975).
produces(south←africa,wheat,1,1975).
produces(spain,wheat,4,1975).
produces(sweden,wheat,1,1975).
produces(switzerland,wheat,0,1975).
produces(syria,wheat,1,1975).
produces(turkey,wheat,14,1975).
produces(uk,wheat,4,1975).
produces(uruguay,wheat,0,1975).
produces(yugoslavia,wheat,4,1975).
produces(afghanistan,rice,0,1975).
produces(argentina,rice,0,1975).
produces(australia,rice,0,1975).
produces(bangladesh,rice,19,1975).
produces(brazil,rice,7,1975).
produces(bulgaria,rice,0,1975).
produces(burma,rice,9,1975).
produces(burma,wheat,0,1975).
produces(cambodia,rice,9,1975).
produces(chile,rice,0,1975).
produces(china,rice,116,1975).
produces(taiwan,rice,2,1975).
produces(colombia,rice,1,1975).
produces(cuba,rice,0,1975).
produces(ecuador,rice,0,1975).
produces(egypt,rice,2,1975).
produces(france,rice,0,1975).
produces(greece,rice,0,1975).
produces(hungary,rice,0,1975).
produces(india,rice,74,1975).
produces(indonesia,rice,22,1975).
produces(iran,rice,1,1975).
produces(iraq,rice,0,1975).
produces(italy,rice,1,1975).
produces(japan,rice,17,1975).
produces(north←korea,rice,3,1975).
produces(south←korea,rice,6,1975).
produces(laos,rice,0,1975).
produces(madagascar,rice,1,1975).
produces(malaysia,rice,2,1975).
produces(mexico,rice,0,1975).
produces(nepal,rice,2,1975).
produces(pakistan,rice,3,1975).
produces(panama,rice,0,1975).
produces(peru,rice,0,1975).
produces(philippines,rice,6,1975).
produces(portugal,rice,0,1975).
produces(romania,rice,0,1975).
produces(spain,rice,0,1975).
produces(sri←lanka,rice,1,1975).
produces(thailand,rice,15,1975).
produces(turkey,rice,0,1975).
produces(uruguay,rice,0,1975).
produces(venezuale,rice,0,1975).
produces(vietnam,rice,12,1975).
produces(yugoslavia,rice,0,1975).
produces(usa,uranium,9,1976).
produces(canada,uranium,4,1976).
produces(south←africa,uranium,3,1976).
produces(france,uranium,2,1976).
produces(niger,uranium,1,1976).
produces(belgium,steel,11,1975).
produces(canada,steel,13,1975).
produces(argentia,steel,1,1975).
produces(australia,steel,8,1975).
produces(austria,steel,4,1975).
produces(brazil,steel,8,1975).
produces(bulgaria,steel,2,1975).
produces(chile,steel,0,1975).
produces(china,steel,29,1975).
produces(taiwan,steel,0,1975).
produces(colombia,steel,0,1975).
produces(cuba,steel,0,1975).
produces(czechoslovakia,steel,14,1975).
produces(denmark,steel,0,1975).
produces(egypt,steel,0,1975).
produces(finland,steel,1,1975).
produces(france,steel,21,1975).
produces(east←germany,steel,6,1975).
produces(west←germany,steel,40,1975).
produces(greece,steel,0,1975).
produces(hungary,steel,3,1975).
produces(india,steel,7,1975).
produces(ireland,steel,0,1975).
produces(israel,steel,0,1975).
produces(italy,steel,21,1975).
produces(japan,steel,102,1975).
produces(north←korea,steel,2,1975).
produces(south←korea,steel,2,1975).
produces(luxembourg,steel,4,1975).
produces(mexico,steel,5,1975).
produces(netherlands,steel,4,1975).
produces(norway,steel,0,1975).
produces(peru,steel,0,1975).
produces(poland,steel,14,1975).
produces(portugal,steel,0,1975).
produces(romania,steel,9,1975).
produces(south←africa,steel,6,1975).
produces(zimbabwe←rhodesia,steel,0,1975).
produces(spain,steel,11,1975).
produces(sweden,steel,5,1975).
produces(switzerland,steel,0,1975).
produces(tunisia,steel,0,1975).
produces(turkey,steel,1,1975).
produces(ussr,steel,141,1975).
produces(uk,steel,20,1975).
produces(usa,steel,105,1975).
produces(venezuela,steel,1,1975).
produces(yugoslavia,steel,2,1975).

belongs(canada,nato).
belongs(canada,commonwealth).
belongs(canada,oecd).
belongs(mexico,oas).
belongs(usa,oas).
belongs(usa,nato).
belongs(argentina,oas).
belongs(bolivia,oas).
belongs(brazil,oas).
belongs(chile,oas).
belongs(ecuador,oas).
belongs(ecuador,opec).
belongs(guyana,commonwealth).
belongs(paraguay,oas).
belongs(peru,oas).
belongs(surinam,oas).
belongs(uruguay,oas).
belongs(venezuela,oas).
belongs(venezuela,opec).
belongs(costa←rica,oas).
belongs(el←salvador,oas).
belongs(guatemala,oas).
belongs(honduras,oas).
belongs(nicaragua,oas).
belongs(panama,oas).
belongs(bahamas,commonwealth).
belongs(barbados,oas).
belongs(barbados,commonwealth).
belongs(dominica←republic,oas).
belongs(grenada,oas).
belongs(grenada,commonwealth).
belongs(haiti,oas).
belongs(jamaica,oas).
belongs(jamaica,commonwealth).
belongs(trinidad←and←tobago,oas).
belongs(trinidad←and←tobago,commonwealth).
belongs(austria,efta).
belongs(austria,oecd).
belongs(belgium,nato).
belongs(belgium,eec).
belongs(belgium,oecd).
belongs(bulgaria,warsaw←pact).
belongs(cyprus,commonwealth).
belongs(czechoslovakia,warsaw←pact).
belongs(denmark,nato).
belongs(denmark,eec).
belongs(denmark,oecd).
belongs(finland,efta).
belongs(finland,oecd).
belongs(france,nato).
belongs(france,eec).
belongs(france,oecd).
belongs(east←germany,warsaw←pact).
belongs(west←germany,nato).
belongs(west←germany,eec).
belongs(west←germany,oecd).
belongs(greece,nato).
belongs(greece,oecd).
belongs(hungary,warsaw←pact).
belongs(iceland,nato).
belongs(iceland,efta).
belongs(iceland,oecd).
belongs(ireland,eec).
belongs(ireland,oecd).
belongs(italy,nato).
belongs(italy,eec).
belongs(italy,oecd).
belongs(luxembourg,nato).
belongs(luxembourg,eec).
belongs(luxembourg,oecd).
belongs(malta,commonwealth).
belongs(netherlands,nato).
belongs(netherlands,eec).
belongs(netherlands,oecd).
belongs(norway,nato).
belongs(norway,efta).
belongs(norway,oecd).
belongs(poland,warsaw←pact).
belongs(portugal,nato).
belongs(portugal,efta).
belongs(portugal,oecd).
belongs(romania,warsaw←pact).
belongs(spain,oecd).
belongs(sweden,oecd).
belongs(sweden,efta).
belongs(switzerland,efta).
belongs(switzerland,oecd).
belongs(ussr,warsaw←pact).
belongs(uk,nato).
belongs(uk,cento).
belongs(uk,eec).
belongs(uk,commonwealth).
belongs(uk,oecd).
belongs(bahrain,arab←league).
belongs(iran,opec).
belongs(iran,cento).
belongs(iraq,opec).
belongs(iraq,arab←league).
belongs(jordan,arab←league).
belongs(kuwait,opec).
belongs(kuwait,arab←league).
belongs(lebanon,arab←league).
belongs(oman,arab←league).
belongs(qatar,opec).
belongs(qatar,arab←league).
belongs(saudi←arabia,opec).
belongs(saudi←arabia,arab←league).
belongs(syria,arab←league).
belongs(turkey,nato).
belongs(turkey,cento).
belongs(turkey,oecd).
belongs(united←arab←emirates,opec).
belongs(united←arab←emirates,arab←league).
belongs(yemen,arab←league).
belongs(yeme←arab←republic,arab←league).
belongs(japan,oecd).
belongs(philippines,asean).
belongs(indonesia,opec).
belongs(indonesia,asean).
belongs(malaysia,asean).
belongs(malaysia,commonwealth).
belongs(singapore,asean).
belongs(singapore,commonwealth).
belongs(thailand,asean).
belongs(bangladesh,commonwealth).
belongs(india,commonwealth).
belongs(pakistan,cento).
belongs(sri←lanka,commonwealth).
belongs(australia,commonwealth).
belongs(fiji,commonwealth).
belongs(new←zealand,commonwealth).
belongs(new←zealand,oecd).
belongs(papua←new←guinea,commonwealth).
belongs(solomo←islands,commonwealth).
belongs(tonga,commonwealth).
belongs(western←samoa,commonwealth).
belongs(algeria,oau).
belongs(algeria,opec).
belongs(algeria,arab←league).
belongs(angola,oau).
belongs(benin,oau).
belongs(benin,ecwas).
belongs(botswana,oau).
belongs(botswana,commonwealth).
belongs(burundi,oau).
belongs(cameroon,oau).
belongs(cameroon,ecwas).
belongs(cape←verde,oau).
belongs(gabon,opec).
belongs(gabon,oau).
belongs(libya,opec).
belongs(libya,oau).
belongs(libya,arab←league).
belongs(nigeria,oau).
belongs(nigeria,opec).
belongs(nigeria,commonwealth).
belongs(nigeria,ecwas).
belongs(tunisia,arab←league).
belongs(somalia,arab←league).
belongs(sudan,arab←league).
belongs(morocco,arab←league).
belongs(mauritania,arab←league).
belongs(djibouti,arab←league).
belongs(egypt,arab←league).
belongs(gambia,commonwealth).
belongs(ghana,commonwealth).
belongs(kenya,commonwealth).
belongs(lesotho,commonwealth).
belongs(malawi,commonwealth).
belongs(mauritius,commonwealth).
belongs(seychelles,commonwealth).
belongs(sierra←leone,commonwealth).
belongs(swaziland,commonwealth).
belongs(tanzania,commonwealth).
belongs(togo,commonwealth).
belongs(uganda,commonwealth).
belongs(zambia,commonwealth).

adjoins(canada,usa).
adjoins(mexico,usa).
adjoins(atlantic←ocean,canada).
adjoins(canada,pacific←ocean).
adjoins(atlantic←ocean,usa).
adjoins(caribbea←sea,usa).
adjoins(pacific←ocean,usa).
adjoins(guatemala,mexico).
adjoins(guatemala,pacific←ocean).
adjoins(el←salvador,guatemala).
adjoins(guatemala,honduras).
adjoins(caribbea←sea,guatemala).
adjoins(british←honduras,guatemala).
adjoins(british←honduras,mexico).
adjoins(british←honduras,caribbea←sea).
adjoins(mexico,pacific←ocean).
adjoins(arctic←ocean,canada).
adjoins(arctic←ocean,greenland).
adjoins(arctic←ocean,norway).
adjoins(arctic←ocean,ussr).
adjoins(atlantic←ocean,greenland).
adjoins(atlantic←ocean,iceland).
adjoins(atlantic←ocean,ireland).
adjoins(atlantic←ocean,uk).
adjoins(atlantic←ocean,france).
adjoins(atlantic←ocean,spain).
adjoins(atlantic←ocean,portugal).
adjoins(atlantic←ocean,straits←of←gibraltar).
adjoins(mediterranean←sea,straits←of←gibraltar).
adjoins(spain,straits←of←gibraltar).
adjoins(morocco,straits←of←gibraltar).
adjoins(atlantic,ocean,morocco).
adjoins(atlantic←ocean,morocco).
adjoins(atlantic←ocean,spanish←sahara).
adjoins(atlantic←ocean,mauritania).
adjoins(atlantic←ocean,senegal).
adjoins(atlantic←ocean,gambia).
adjoins(atlantic←ocean,sierra←leone).
adjoins(atlantic←ocean,liberia).
adjoins(atlantic←ocean,ivory←coast).
adjoins(atlantic←ocean,ghana).
adjoins(atlantic←ocean,togo).
adjoins(atlantic←ocean,benin).
adjoins(atlantic←ocean,nigeria).
adjoins(atlantic←ocean,cameroon).
adjoins(atlantic←ocean,gabon).
adjoins(atlantic←ocean,angola).
adjoins(atlantic←ocean,namibia).
adjoins(atlantic←ocean,south←africa).
adjoins(atlantic←ocean,straits←of←magellan).
adjoins(argentina,atlantic,ocean).
adjoins(argentina,straits←of←magellan).
adjoins(chile,straits←of←magellan).
adjoins(chile,pacific←ocean).
adjoins(argentina,chile).
adjoins(argentina,bolivia).
adjoins(argentina,paraguay).
adjoins(argentina,uruguay).
adjoins(argentina,brazil).
adjoins(atlantic←ocean,uruguay).
adjoins(atlantic←ocean,brazil).
adjoins(atlantic←ocean,french←guiana).
adjoins(atlantic←ocean,guyana).
adjoins(atlantic←ocean,surinam).
adjoins(atlantic←ocean,venezuela).
adjoins(atlantic←ocean,trinidad←and←tobago).
adjoins(atlantic←ocean,caribbea←sea).
adjoins(atlantic←ocean,gulf←of←mexico).
adjoins(caribbea←sea,gulf←of←mexico).
adjoins(atlantic←ocean,india←ocean).
adjoins(india←ocean,south←africa).
adjoins(india←ocean,pacific←ocean).
adjoins(india←ocmozambique).
adjoins(india←ocean,mozambique).
adjoins(india←ocean,madagascar).
adjoins(arabia←sea,india←ocean).
adjoins(arabia←sea,gulf←of←aden).
adjoins(gulf←of←aden,red←sea).
adjoins(suez←canal,red←sea).
adjoins(mediterranean←sea,suez←canal).
adjoins(gulf←of←oman,persia←gulf).
adjoins(gulf←of←oman,arabia←sea).
adjoins(bering←sea,ussr).
adjoins(bering←sea,usa).
adjoins(arctic←ocean,bering←sea).
adjoins(bering←sea,pacific←ocean).
adjoins(egypt,suez←canal).
adjoins(panama,panama←canal).
adjoins(caribbea←sea,panama←canal).
adjoins(atlantic←ocean,english←channel).
adjoins(english←channel,north←sea).
adjoins(netherlands,north←sea).
adjoins(netherlands,west←germany).
adjoins(belgium,netherlands).
adjoins(belgium,north←sea).
adjoins(belgium,luxembourg).
adjoins(belgium,west←germany).
adjoins(belgium,france).
adjoins(english,channel,france).
adjoins(france,luxembourg).
adjoins(france,west←germany).
adjoins(france,switzerland).
adjoins(france,mediterranean←sea).
adjoins(france,italy).
adjoins(france,spain).
adjoins(andorra,france).
adjoins(mediterranean←sea,spain).
adjoins(portugal,spain).
adjoins(andorra,spain).
adjoins(italy,switzerland).
adjoins(italy,yugoslavia).
adjoins(austria,italy).
adjoins(italy,mediterranean←sea).
adjoins(east←germany,west←germany).
adjoins(east←germany,poland).
adjoins(czechoslovakia,west←germany).
adjoins(czechoslovakia,east←germany).
adjoins(austria,west←germany).
adjoins(switzerland,west←germany).
adjoins(denmark,west←germany).
adjoins(north←sea,west←germany).
adjoins(baltic←sea,west←germany).
adjoins(baltic←sea,east←germany).
adjoins(baltic←sea,poland).
adjoins(baltic←sea,ussr).
adjoins(baltic←sea,finland).
adjoins(baltic←sea,sweden).
adjoins(baltic←sea,kattegat).
adjoins(kattegat,skagerrak).
adjoins(skagerrak,north←sea).
adjoins(kattegat,denmark).
adjoins(kattegat,sweden).
adjoins(skagerrak,denmark).
adjoins(skagerrak,norway).
adjoins(norway,atlantic←ocean).
adjoins(norway,sweden).
adjoins(north←sea,norway).
adjoins(finland,norway).
adjoins(norway,ussr).
adjoins(finland,sweden).
adjoins(finland,ussr).
adjoins(czechoslovakia,poland).
adjoins(poland,ussr).
adjoins(austria,switzerland).
adjoins(austria,czechoslovakia).
adjoins(austria,yugoslavia).
adjoins(austria,hungary).
adjoins(hungary,romania).
adjoins(hungary,yugoslavia).
adjoins(czechoslovakia,hungary).
adjoins(czechoslovakia,ussr).
adjoins(hungary,ussr).
adjoins(romania,ussr).
adjoins(bulgaria,ussr).
adjoins(bulgaria,romania).
adjoins(black←sea,bulgaria).
adjoins(bulgaria,greece).
adjoins(bulgaria,turkey).
adjoins(bulgaria,yugoslavia).
adjoins(mediterranean←sea,yugoslavia).
adjoins(albania,yugoslavia).
adjoins(albania,greece).
adjoins(mediterranean←sea,albania).
adjoins(black←sea,turkey).
adjoins(black←sea,romania).
adjoins(black←sea,ussr).
adjoins(greece,yugoslavia).
adjoins(turkey,ussr).
adjoins(mediterranean←sea,turkey).
adjoins(iran,turkey).
adjoins(iraq,turkey).
adjoins(syria,turkey).
adjoins(pacific←ocean,straits←of←magellan).
adjoins(red←sea,suez←canal).
adjoins(india,pakistan).
adjoins(india,nepal).
adjoins(china,india).
adjoins(burma,india).
adjoins(bangladesh,india).
adjoins(bhutan,india).
adjoins(arabia←sea,india).
adjoins(bay←of←bengal,india).
adjoins(india,india←ocean).
adjoins(bay←of←bengal,india←ocean).
adjoins(arabia←sea,pakistan).
adjoins(india,sikkim).
adjoins(bhutan,sikkim).
adjoins(nepal,sikkim).
adjoins(china,nepal).
adjoins(afghanistan,iran).
adjoins(afghanistan,ussr).
adjoins(afghanistan,pakistan).
adjoins(afghanistan,china).
adjoins(china,ussr).
adjoins(china,mongolia).
adjoins(mongolia,ussr).
adjoins(burma,china).
adjoins(china,laos).
adjoins(china,vietnam).
adjoins(china,bhutan).
adjoins(china,sikkim).
adjoins(china,pakistan).
adjoins(china,north←korea).
adjoins(china,yellow←sea).
adjoins(east←china←sea,yellow←sea).
adjoins(china,east←china←sea).
adjoins(east←china←sea,pacific←ocean).
adjoins(east←china←sea,formosa←strait).
adjoins(formosa←strait,south←china←sea).
adjoins(china,south←china←sea).
adjoins(philippine←sea,pacific←ocean).
adjoins(philippines,philippine←sea).
adjoins(philippines,south←china←sea).
adjoins(south←china←sea,vietnam).
adjoins(laos,vietnam).
adjoins(cambodia,gulf←of←siam).
adjoins(gulf←of←siam,south←china←sea).
adjoins(israel,dead←sea).
adjoins(jordan,dead←sea).
adjoins(ethiopia,sudan).
adjoins(ethiopia,kenya).
adjoins(ethiopia,somalia).
adjoins(ethiopia,gulf←of←aden).
adjoins(djibouti,ethiopia).
adjoins(djibouti,gulf←of←aden).
adjoins(djibouti,somalia).
adjoins(ethiopia,red←sea).
adjoins(egypt,sudan).
adjoins(suez←canal,gulf←of←suez).
adjoins(gulf←of←suez,red←sea).
adjoins(taiwan,taiwa←straits).
adjoins(taiwan,pacific←ocean).
adjoins(gulf←of←siam,thailand).
adjoins(laos,thailand).
adjoins(cambodia,laos).
adjoins(north←korea,south←korea).
adjoins(north←korea,ussr).
adjoins(north←korea,yellow←sea).
adjoins(sea←of←japan,north←korea).
adjoins(south←korea,yellow←sea).
adjoins(sea←of←japan,south←korea).
adjoins(korea←strait,sea←of←japan).
adjoins(korea←strait,east←china←sea).
adjoins(korea←strait,south←korea).
adjoins(japan,korea←strait).
adjoins(japan,pacific←ocean).
adjoins(east←china←sea,japan).
adjoins(denmark,north←sea).
adjoins(greece,mediterraniea←sea).
adjoins(greece,mediterranean←sea).
adjoins(israel,mediterranean←sea).
adjoins(egypt,mediterranean←sea).
adjoins(libya,mediterranean←sea).
adjoins(tunisia,mediterranean←sea).
adjoins(algeria,mediterranean←sea).
adjoins(morocco,mediterranean←sea).
adjoins(malta,mediterranean←sea).
adjoins(libya,tunisia).
adjoins(libya,algeria).
adjoins(libya,niger).
adjoins(chad,libya).
adjoins(libya,sudan).
adjoins(libya,egypt).
adjoins(algeria,tunisia).
adjoins(algeria,morocco).
adjoins(algeria,mauritania).
adjoins(algeria,mali).
adjoins(algeria,niger).
adjoins(dahomey,nigeria).
adjoins(niger,nigeria).
adjoins(chad,nigeria).
adjoins(cameroon,nigeria).
adjoins(iran,ussr).
adjoins(caspia←sea,iran).
adjoins(iran,pakistan).
adjoins(iran,iraq).
adjoins(iran,persia←gulf).
adjoins(iran,gulf←of←oman).
adjoins(oman,gulf←of←oman).
adjoins(iraq,syria).
adjoins(iraq,jordan).
adjoins(iraq,saudi←arabia).
adjoins(iraq,kuwait).
adjoins(iraq,persia←gulf).
adjoins(iran,straits←of←hormuz).
adjoins(persia←gulf,straits←of←hormuz).
adjoins(jordan,israel).
adjoins(jordan,syria).
adjoins(jordan,saudi←arabia).
adjoins(jordan,gulf←of←aqabq).
adjoins(gulf←of←aqabq,red←sea).
adjoins(israel,egypt).
adjoins(israel,lebanon).
adjoins(israel,syria).
adjoins(israel,gulf←of←aqaba).
adjoins(dardanelles,turkey).
adjoins(dardanelles,sea←of←marmara).
adjoins(sea←of←marmara,turkey).
adjoins(sea←of←marmara,bosporus).
adjoins(bosporus,turkey).
adjoins(bab←el←mandeb,djibouti).
adjoins(bab←el←mandeb,yemen).
adjoins(bab←el←mandeb,yeme←arab←republic).
adjoins(bab←el←mandeb,red←sea).
adjoins(bab←el←mandeb,gulf←of←aden).
adjoins(straits←of←hormuz,united←arab←emirates).
adjoins(straits←of←hormuz,oman).
adjoins(straits←of←dover,uk).
adjoins(straits←of←dover,france).
adjoins(straitπ←of←dover,english←channel).
adjoins(straits←of←dover,north←sea).
adjoins(monaco,mediterranean←sea).
adjoins(arctic←ocean,usa).

borders(X,Y):-adjoins(X,Y).
borders(X,Y):-adjoins(Y,X).

% ******** That's all ********