Both responded after the Supreme Court’s 6–3 ruling that presidents are immune from criminal prosecution for “official acts.”