which common prime minister did john moore and john macgregor serve ?
SELECT DISTINCT var_uri where brack_open dbr_John_Moore,_Baron_Moore_of_Lower_Marsh dbo_primeMinister var_uri sep_dot dbr_John_MacGregor,_Baron_MacGregor_of_Pulham_Market dbo_primeMinister var_uri brack_close