  In this paper, we focus on the reconfigurable intelligent surface
(RIS)-enhanced two-way device-to-device (D2D) multi-pair
orthogonal-frequency-division-multiplexing (OFDM) communication systems.
Specifically, we maximize the minimum bidirectional weighted sum-rate by
jointly optimizing the sub-band allocation, the power allocation and the
discrete phase shift (PS) design at the RIS. To tackle the main difficulty of
the non-convex PS design at the RIS, we firstly formulate a semi-definite
relaxation problem and further devise a low-complexity solution for the PS
design by leveraging the projected sub-gradient method. We demonstrate the
desirable performance gain for the proposed designs through numerical results.
