Ireland maintained their pursuit for the Six Nations title with a 27-18 victory over Wales, securing them the Triple Crown.