who was the president at the time when both john barton payne and thomas watt gregory held a position in us political framework ?
SELECT DISTINCT var_uri where brack_open dbr_John_Barton_Payne dbp_president var_uri sep_dot dbr_Thomas_Watt_Gregory dbp_president var_uri brack_close