Question: Which one lies on a smaller area,  Hancock County (the one that shares border with Penobscot County) or Cumberland County (the one that is located in Maine) ?
Choices: Cumberland County
Aroostook County
Kennebec County
York County
Somerset County
Hancock County
Oxford County
Washington County
Penobscot County
Franklin County
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hancock County" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Penobscot County" .   } UNION { ?e <pred:name> "Cumberland County" . ?e <located_in_the_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Maine" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Penobscot County
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Hancock County
function: And
dependencies: 1
2
function: Find
inputs: Maine
function: Relate
dependencies: 4
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Cumberland County
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: area
less
Answer: Cumberland County