
diff(red,green).
diff(green,red).

diff(blue,green).
diff(green,blue).

diff(blue,red).
diff(red,blue).

color(Myanmar,Thailand,Cambodia,Vietnam,Laos) :-
    diff(Myanmar,Thailand),
    diff(Myanmar,Laos),
    diff(Thailand,Laos),
    diff(Thailand,Cambodia),
    diff(Laos,Cambodia),
    diff(Laos,Vietnam),
    diff(Cambodia,Vietnam).


color(Myanmar,Thailand,Cambodia,Vietnam,Laos,China) :-
    diff(Myanmar,China),
    diff(Myanmar,Thailand),
    diff(Myanmar,Laos),
    diff(Thailand,Laos),
    diff(Thailand,Cambodia),
    diff(Laos,Cambodia),
    diff(Laos,Vietnam),
    diff(Laos,China),
    diff(Cambodia,Vietnam),
    diff(Vietnam,China).

