If any person becomes liable for tax under any section of chapter 42 (relating to private foundations and certain other tax-exempt organizations) by reason of any act or failure to act which is not due to reasonable cause and either—

(1)such person has theretofore been liable for tax under such chapter, or

(2)such act or failure to act is both willful and flagrant,

then such person shall be liable for a penalty equal to the amount of such tax.