Coordination with other higher education benefits
The amount of the qualified higher education expenses otherwise taken into account under subsection (a) with respect to the education of an individual shall be reduced (before the application of subsection (b)) by—
(A)#
the amount of such expenses which are taken into account in determining the credit allowed to the taxpayer or any other person under section 25A with respect to such expenses; and
(B)#
the amount of such expenses which are taken into account in determining the exclusions under sections 529(c)(3)(B) and 530(d)(2).